Rescue

In this code: http://pastie.org/private/llneqf8bi5kf3i82q2ivw from
http://rubylearning.com/satishtalim/ruby_exceptions.html, I really
didn’t get the idea of “rescue” and what it is supposed to do?

Can you just explain it further?

Thanks.

If you are familiar to other programming languages such as Java, rescue
is
similar to ‘catch’.
Basically literally speaking, it rescues you in case there is an
exception
and catches the exception and gives you the chance to do something about
it
a bit more gracefully compared to the vm. I hope that made it a bit
clear to
you.

On Tue, Jul 13, 2010 at 18:00, Abder-Rahman A.
[email protected]wrote:

Thanks & Regards,
Dhruva S…

Dhruva S. wrote:

If you are familiar to other programming languages such as Java, rescue
is
similar to ‘catch’.
Basically literally speaking, it rescues you in case there is an
exception
and catches the exception and gives you the chance to do something about
it
a bit more gracefully compared to the vm. I hope that made it a bit
clear to
you.

On Tue, Jul 13, 2010 at 18:00, Abder-Rahman A.
[email protected]wrote:

Thanks & Regards,
Dhruva S…

Thanks a lot. Yes, now I get it. If it is like “catch” in Java which I’m
aware it, that points it.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs