Mariusz Pekala
7/12/2007 11:45:00 AM
On 2007-07-12 18:32:49 +0900 (Thu, Jul), Vin Raja wrote:
> Dear All
>
> I wonder if anyone could better explain me the difference between
> rescue-raise and catch-throw paradigms
>
> Thanks in Advance
> Raja
With raise you operate on descendants of Exception class.
With throw you can use any object.
I suppose this is the main difference.
Raise should be used for errors and similiar things, while throw just
for standard operations. It would be very confusing for the reader of
the code if raise would be used to pass data, and not for being the
signal that some dangerous/unusual condition may be handled here.
I guess.
Of course, I may be wrong ;-)
--
I have tried to Google this question, but Google said:
"Application error, Rails application failed to start properly"