るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
4件ヒット [1-4件を表示] (0.262秒)
トップページ > バージョン:2.4.0[x] > ライブラリ:ビルトイン[x] > クエリ:report_on_exception[x]

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

検索結果

Thread#report_on_exception -> bool (54421.0)

真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。

真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。

デフォルトはスレッド作成時の Thread.report_on_exception です。

@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。

//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
a.report_on_exception # => true
a.run
# => #<Th...

Thread.report_on_exception -> bool (54367.0)

真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。

真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。

デフォルトは false です。

Thread.new { 1.times { raise } }

は $stderr に以下のように出力します:

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

Thread#report_on_exception=(newstate) (18421.0)

真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。

真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。

デフォルトはスレッド作成時の Thread.report_on_exception です。

@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。

//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
a.report_on_exception # => true
a.run
# => #<Th...

Thread.report_on_exception=(newstate) (18367.0)

真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。

真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。

デフォルトは false です。

Thread.new { 1.times { raise } }

は $stderr に以下のように出力します:

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