From: Joel Pearson Date: 2013-01-29T18:23:23+09:00 Subject: Re: question on watir You're rescuing the exceptions inside fun1, but your loop inside class fun will continue because you're not passing the exception any higher. Catch specific types of exceptions. http://wtr.rubyforge.org/rdoc/1.6.5/classes/Watir/Exception.html This one should cover server outages: Watir::Exception::TimeOutException You're kind of missing the point with the class, it's intended to encapsulate your methods. Also this: _____________________ def fun1(argument) begin if(argument == this) fun2 end end begin if(argument == some) fun3 end end begin if(argument == something) fun4 end end rescue #some statement end _____________________ is equivalent to this: _____________________ def fun1(argument) if argument == this fun2 elsif argument == some fun3 elsif argument == something fun4 end rescue #some statement end _____________________ -- Posted via http://www.ruby-forum.com/.