Exceptions cause DRb connection to be closed
If an exception is thrown in a DRb server of a class that is not defined in the client process, the DRb connection is closed abrubtly. In Ruby 1.8, the exception was translated to an instance generic exception class (DRb::DRbRemoteError).
Steps to reproduce:
- Start DRb client+server
- Throw exception of custom class in server (class not defined in client script).
- Client raises DRb::DRbConnError because connection is closed - used to be generic error.
- Client raises DRb::DRbRemoteError, and preserves full stack trace from server.
Attached is server/client script showing the problem.
Here is the stack trace of the client:
load': connection closed (DRb::DRbConnError)recv_reply'
block (2 levels) in method_missing'open'
block in method_missing'with_friend'