On Thu, 2002-05-30 at 19:10, Dan Sugalski wrote:
At 6:49 PM +0200 5/30/02, Erik Bågfors wrote:
>On Thu, 2002-05-30 at 18:38, Dan Sugalski wrote:
>> Here's a question. Does Ruby require that you be able to catch an
>> exception then restart or resume from where the exception was thrown?
>
>AFAIK no,
>
>What you do in ruby is restart by hand.
Cool. I was worried you could do something like:
try {
object.method_which_pitches_exception();
} catch {
resume;
}
and have the resume jump back into the object's method at the place
where it threw the exception. Not having to do that makes life easier.
I've never seen that, but I'm not 100% sure about it.
Another thing you have in ruby is "throw" and "catch". They have
nothing to do with the try/catch/throw that you have in for example
java.