From: Jeffrey Moss Date: 2005-12-09T04:17:38+09:00 Subject: Re: rescue anything raised? rescue Exception All exceptions descend from class Exception. -Jeff On Fri, Dec 09, 2005 at 04:12:35AM +0900, William E. Rubin wrote: > Is there a way to rescue any raised error? Like "rescue *" or > something? > > The "Programming Ruby" book on ruby-lang.org says that just plain > "rescue" (without a parameter list) will rescue any "StandardError", > but it doesn't go on to say that anything raised is necessarily > descended from StandardError, or to explicitly mention a way to rescue > everything. > > I was guessing that just plain "rescue" might work, but this doesn't > seem to be true - my code just got a "Timeout::Error", and it was not > rescued by a parameterless "rescue". > > Thanks. > >