[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

threads and errors

Charles Mills

12/20/2004 12:05:00 AM

What techniques are available for handling errors that occur in
threads?

For example how do I find out that an error occured in t below?

t = Thread.new { raise "error" }

I need to be able to check on the error status of threads from their
parent. Something like the following would be ideal - but I know this
won't do what I want:

begin
Thread.new { raise "error"}
rescue
puts $! # in a strange world prints "error", but in actuality does
nothing
end


-Charlie