From: Clifford Heath Date: 2008-01-09T10:24:59+09:00 Subject: Re: Execution stops once exception is fired Mauricio Gonzales wrote: > I am using ruby and watir to test my web application. > The problem is that the ruby script stops the execution each time that > raises an error. Is there any way by which i can continue execution of > the script even after firing exceptions. Here i left some code to > explain the situation > > object = Test.new("","") > begin > object.method1() > object.method2() ->here I put an exception intentionally > object.method3() > rescue => e > puts e > end > > and never executes the method3() That's the way it's meant to work, it's just what exceptions are, non-local "goto"s to a handler. If you want method3 always to be called, put it in a "finally" clause. Clifford Heath.