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.

···

--
Posted via http://www.ruby-forum.com/.

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 Ali <abder.rahman.ali@gmail.com>wrote:

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.
--
Posted via http://www.ruby-forum.com/.

--

Thanks & Regards,
Dhruva Sagar.

Dhruva Sagar 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.

--

Thanks & Regards,
Dhruva Sagar.

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

···

On Tue, Jul 13, 2010 at 18:00, Abder-Rahman Ali > <abder.rahman.ali@gmail.com>wrote:

--
Posted via http://www.ruby-forum.com/.