Project

General

Profile

Bug #13163

Updated by nobu (Nobuyoshi Nakada) almost 2 years ago

When we set true on both of `Thread#report_on_exception` Thread#report_on_exception and `Thread#abort_on_exception`, Thread#abort_on_exception, it just works as `Thread#abort_on_exception` Thread#abort_on_exception and raised error will be re-raised in main thread.
But in our case, main thread sometimes in `begin`-`rescue` begin-rescue clause, or sometimes out of `begin`-`rescue` begin-rescue clause.
When main thread in `begin`-`rescue` begin-rescue clause (and main thread code may raise errors in their own business), we cannot know that threads are dead by errors.

What I expected by specifying both of `Thread#report_on_exception=true` Thread#report_on_exception=true and `Thread#abort_on_exception=true`:

Thread#abort_on_exception=true:
* "Thread terminated with exception" is reported always (even if `Thread#abort_on_exception` Thread#abort_on_exception is set)
* Raised error is re-raised in main thread if `Thread#abort_on_exception` Thread#abort_on_exception is true

How do you think about this idea?

Back