Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: Why this exception is not caught?
Rick DeNatale
9/11/2006 8:56:00 PM
On 9/11/06, Hemant . <inxs.hemant@gmail.com> wrote:
> In this case, when the exception is raised on line # 94, then in the calling
> method...it is handled as general rescue...and its not handled as Exception
> of Class RetryException.However, if i remove the last rescue statement in
> the second method it works alright.
Because that second rescue statement catches any exception which is a
subclass of StandardError, so it catches the RetryException.
Then the statement
raise "some other error"
raises a RunTimeError with "some other error" as a message.
So the outer method sees the RunTimeError and not the original RetryException.
--
Rick DeNatale
My blog on Ruby
http://talklikeaduck.denh...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Why this exception is not caught?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password