RCR: output on non-main thread that die from an unrescued exception

Hello all.
I noticed that the default behavior for ruby is, if a child (non-main)
thread dies from an “unrescued” exception, nothing is output, it is
basically let die silently.

Feature request/RCR: if a child thread dies, output the stack track to
stderr, like it does if the main thread dies similarly.

Thoughts?
-r

Roger P. wrote in post #1028871:

Hello all.
I noticed that the default behavior for ruby is, if a child (non-main)
thread dies from an “unrescued” exception, nothing is output, it is
basically let die silently

+1 for me,

Except, perhaps, if a join() is pending for the thread…

And these should perhaps be the default :
Thread.abort_on_exception=true
BasicSocket.do_not_reverse_lookup=true

And these should perhaps be the default :
Thread.abort_on_exception=true
BasicSocket.do_not_reverse_lookup=true

Thankfully with 1.0.x
BasicSocket.do_not_reverse_lookup=true
is the default now.

Also I discovered that if you run your ruby script in “debug” mode (-d)
then it does output the backtrace of inner dying threads. This should
be the default, in my opinion. Hmm…man if only Matz would accept
suggestions. Seriously. It’s ok to take feedback from the community!
It doesn’t have to be all you!
-roger-

On Wed, Nov 2, 2011 at 6:48 PM, Roger P. [email protected]
wrote:

Hmm…man if only Matz would accept
suggestions. Seriously. It’s ok to take feedback from the community!
It doesn’t have to be all you!

File a feature request http://redmine.ruby-lang.org/. It will get at
least some discussion, and it’s mirrored on ruby-core. :slight_smile:


Phillip G.

gplus.to/phgaw | twitter.com/phgaw

A method of solution is perfect if we can forsee from the start,
and even prove, that following that method we shall attain our aim.
– Leibniz