Jano Svitok
8/18/2006 8:02:00 PM
On 8/18/06, Junkone <junkone1@gmail.com> wrote:
> HI
> My exception handling routine is not able to thro the stack trace etc
> of the exception .
> for eg.
> rescue Exception
> puts $_
> I get a nil in $_
>
> However when i dont handle the exception, i get the nice exception
> message
> Watir::Exception::UnknownObjectException: Unable to locate object,
> using id and
>
> How do i capture the exception details?
> Regards
>
> Seede
either use $! and $@, or write it more explicitly:
...
rescue Exception ex
puts ex.mesage
puts ex.backtrace.join("\n")
end