Exception handling in ruby

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

On 8/18/06, Junkone [email protected] wrote:

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