From: ts Date: 2002-05-25T18:40:16+09:00 Subject: Re: Threading oddness >>>>> "S" == Sean Russell writes: S> I would find it more intuitive if exceptions that occurred within threads S> were handled similarly to exceptions outside of the thread: at the very S> least, you get a dump to the console letting you know that something went S> wrong. Why you don't use Thread::abort_on_exception ? pigeon% cat b.rb #!/usr/bin/ruby Thread.abort_on_exception = ARGV.size > 0 Thread.new do p "before" p "#{a}" p "after" end sleep 1 p "end" pigeon% pigeon% b.rb "before" "end" pigeon% pigeon% b.rb 1 "before" ./b.rb:5: undefined local variable or method `a' for # (NameError) from ./b.rb:3:in `initialize' from ./b.rb:3:in `new' from ./b.rb:3 pigeon% Guy Decoux