[Wtr-general] OT: Need help Trapping Errors in Ruby

Paul Carvalho tester.paul at gmail.com
Wed Jan 10 16:40:24 EST 2007


page_set is just a local variable used to call the method name that I want
to execute.

I'm basically calling a method (e.g. 'walk_Public_Pages') from within a
method (page_set_to_check) that is supposed to trap the errors/exceptions.

However, if there's an error in the 'walk_Public_Pages' method, it not only
escapes out of the page_set_to_check() method, but also out of the whole
script!

I'm wondering if changing the main "module" to a "class" will have a
different effect?  Just a shot in the dark.  I'm chasing another goose at
the moment, so I'll try that shortly.

P.C.

On 10/01/07, John Lolis <forum-watir-users at openqa.org> wrote:
>
> I'm a touch confused by this, what is page_set?
>
> My first reaction is to say that somewhere deeper down in your code an
> exception is begin thrown and is silently beginning handled thus said
> function returns even though things didn't work.
>
> The only reason I'm guessing this is because of the way you handle this
> exception.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070110/91fee490/attachment.html 


More information about the Wtr-general mailing list