From: naruse@... Date: 2017-09-19T02:02:25+00:00 Subject: [ruby-core:82854] [Ruby trunk Bug#13163][Assigned] Uncaught exceptions may not be reported when Thread#report_on_exception=true and Thread#abort_on_exception=true Issue #13163 has been updated by naruse (Yui NARUSE). Tracker changed from Misc to Bug Status changed from Feedback to Assigned Assignee set to nobu (Nobuyoshi Nakada) Backport set to 2.2: DONTNEED, 2.3: REQUIRED, 2.4: REQUIRED Hmm, indeed this seems considered a bug. @nobu Could you commit it? ---------------------------------------- Bug #13163: Uncaught exceptions may not be reported when Thread#report_on_exception=true and Thread#abort_on_exception=true https://bugs.ruby-lang.org/issues/13163#change-66750 * Author: tagomoris (Satoshi TAGOMORI) * Status: Assigned * Priority: Normal * Assignee: nobu (Nobuyoshi Nakada) * Target version: * ruby -v: * Backport: 2.2: DONTNEED, 2.3: REQUIRED, 2.4: REQUIRED ---------------------------------------- When we set true on both of `Thread#report_on_exception` and `Thread#abort_on_exception`, it just works as `Thread#abort_on_exception` and raised error will be re-raised in main thread. But in our case, main thread sometimes in `begin`-`rescue` clause, or sometimes out of `begin`-`rescue` clause. When main thread in `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` and `Thread#abort_on_exception=true`: * "Thread terminated with exception" is reported always (even if `Thread#abort_on_exception` is set) * Raised error is re-raised in main thread if `Thread#abort_on_exception` is true How do you think about this idea? -- https://bugs.ruby-lang.org/ Unsubscribe: