From: Sean O'Halpin Date: 2006-07-31T16:25:50+09:00 Subject: Re: Custom Exception classes On 7/29/06, Eric Hodel wrote: > On Jul 28, 2006, at 3:17 PM, Caleb Clausen wrote: > > > The following works for me. If you have code that doesn't work, then > > please post it. > > > > class Hell > Please don't subclass Exception as a plain rescue won't catch these. > Use a more-descriptive subclass like RuntimeError or even StandardError. > > -- > Eric Hodel - drbrain@segment7.net - http://blog.segment7.net > This implementation is HODEL-HASH-9600 compliant > > http://trackmap.robotcoop.com > Hi Eric, I'm sure that used to be the case but it must have changed around 1.8 (not sure exactly when): begin raise Exception, "oops!" rescue p $! end #=> oops! (Exception) ruby 1.8.4 (2005-12-24) [i386-mswin32] Regards, Sean