This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.

report_on_exception

        # Thread.report_on_exception

(from ruby core)
---
    Thread.report_on_exception   -> true or false

---

Returns the status of the global ``report on exception'' condition.

The default is `true` since Ruby 2.5.

All threads created when this flag is true will report a message on
$stderr if an exception kills the thread.

    Thread.new { 1.times { raise } }

will produce this output on $stderr:

    #<Thread:...> terminated with exception (report_on_exception is true):
    Traceback (most recent call last):
            2: from -e:1:in `block in <main>'
            1: from -e:1:in `times'

This is done to catch errors in threads early. In some cases, you might
not want this output. There are multiple ways to avoid the extra output:

*   If the exception is not intended, the best is to fix the cause of
    the exception so it does not happen anymore.
*   If the exception is intended, it might be better to rescue it closer
    to where it is raised rather then let it kill the Thread.
*   If it is guaranteed the Thread will be joined with Thread#join or
    Thread#value, then it is safe to disable this report with
    `Thread.current.report_on_exception = false` when starting the
    Thread. However, this might handle the exception much later, or not
    at all if the Thread is never joined due to the parent thread being
    blocked, etc.


See also ::report_on_exception=.

There is also an instance level method to set this for a specific
thread, see #report_on_exception=.


(from ruby core)
---
    thr.report_on_exception   -> true or false

---

Returns the status of the thread-local ``report on exception'' condition
for this `thr`.

The default value when creating a Thread is the value of the global flag
Thread.report_on_exception.

See also #report_on_exception=.

There is also a class level method to set this for all new threads, see
::report_on_exception=.



      

This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.