From: Dave Thomas Date: 2002-02-12T04:11:42+09:00 Subject: Re: rescue syntax Alan Chen writes: > For methods, I'd imagine something like the following > > def method > # method logic > rescue > # oops, bad logic > end Shazzaam! And so it shall be. :) Ruby supports this articular syntax already. It also has a per-statement rescue: # convert str to an integer if possible, otherwise set # it to -1 a = (Integer(str) rescue -1) (the parentheses are needed here) Cheers Dave