Yasushi Shoji replied:
> At Mon, 8 Jan 2001 14:11:43 +0900,
> and.u <is.r / com.is-andy.com> wrote:
> > 
> > I debug ruby program with thread.
> > When thread happen some mistake,
> > It dies directly, without any warn info.
> > How do I get more infomation
> 
> if you don't join the thread, it dies silently.
> 
> It'll abort if Thread.abort_on_exception == true
> 
> If $DEBUG, it aborts regardless of Thread.abort_on_exception
> 
> The switch `-d' for the ruby interpreter sets $DEBUG
> 
> (yup, I asked the same Q on -list ;p)

Let me add that it might be beneficial to take control of the error handling
in the thread itself and say something like:

  thread = Thread.new do
    begin
      all_my_nasty_code_which_might_die_without warning
    rescue TheExceptionYouAreInterestedIn => e
      report_in_a_way_you_want(e)
      raise
    end
  end
  thread.join

The other nice feature is that you should be able to set a break point for
the rescuing code. And if you fall in love with this you might make your own
SaferThread with identical call syntax and automatical error handling
wrapping.

	- Aleksi