From: Martin Hart Date: 2004-01-16T05:10:09+09:00 Subject: Re: DRb and Exceptions when using DRbUndumped On Thursday 15 January 2004 06:00, NAKAMURA, Hiroshi wrote: > Hi, > > > From: "Martin Hart" > > Sent: Wednesday, January 14, 2004 3:41 AM > > > > Ideally I'd like the exception to be transported to the client and then > > raised there - i do not want the connection to be closed. Is that doable > > or do I need to avoid the use of exceptions from my "exported" methods? > > Must be doable. Can you post the code? > > Running ruby with -d option might help to know what is going on. > ok - first off I am using drb 2.0.4 with ruby 1.6.8 My tests have revealed the following.... raising a class that derives from ::Exception calls the server to close connection, but raising a class that derives from ArgumentError, TypeError, StandardError, etc does not. to work around the problem all i had to do was change my exception classes to inherit from StandardError and not Exception. I had a quick look through drb.rb and do in fact see that the drb code does not specifically "rescue Exception", and that appears to have been the cause of my problem. I can post code to reproduce if you really want it - but now I have a workaround I am not all that worried (unless of course my diagnosis is incorrect :-) thanks for your help anyway, cheers Martin > Regards, > // NaHi