From: "Mariusz Pękala" Date: 2007-07-12T20:44:54+09:00 Subject: Re: recue-raise vs catch-throw --17pEHd4RhPHOinZp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2007-07-12 18:32:49 +0900 (Thu, Jul), Vin Raja wrote: > Dear All >=20 > I wonder if anyone could better explain me the difference between > rescue-raise and catch-throw paradigms >=20 > 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 ;-) --=20 I have tried to Google this question, but Google said: "Application error, Rails application failed to start properly" --17pEHd4RhPHOinZp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7-ecc0.1.6 (GNU/Linux) iD8DBQFGlhQ3snU0scoWZKARAlnWAJ9rJP6ASlNWXLdNR+Z8FSJiobC2ywCfRUxt tKe8gvTHAQ41fODBAWH019w= =s1Lj -----END PGP SIGNATURE----- --17pEHd4RhPHOinZp--