78件ヒット
[1-78件を表示]
(0.093秒)
種類
- インスタンスメソッド (26)
- 文書 (26)
- 特異メソッド (26)
ライブラリ
- ビルトイン (52)
クラス
- Thread (52)
キーワード
-
NEWS for Ruby 2
. 4 . 0 (13) -
NEWS for Ruby 2
. 5 . 0 (13) -
report
_ on _ exception= (26)
検索結果
先頭5件
-
Thread
# report _ on _ exception -> bool (39192.0) -
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
...成時の [m:Thread.report_on_exception] です。
- **param** `newstate` -- スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。
```ruby title="例"
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
p a.......true
a.run
# => #<Thread:0x00007fc3f48c7908 (irb):1 run> terminated with exception (report_on_exception is true):
# Traceback (most recent call last):
# (irb):1:in `block in irb_binding': unhandled exception
# #<Thread:0x00007fc3f48c7908 (irb):1 dead>
b = Thread.new{ Thread.stop; raise }
b.......report_on_exception = false
p b.run # => #<Thread:0x00007fc3f48aefc0 (irb):4 dead>
```
- **SEE** [m:Thread.report_on_exception]......true
a.run
# => #<Thread:0x00007fc3f48c7908 (irb):1 run> terminated with exception (report_on_exception is true):
# Traceback (most recent call last):
# (irb):1:in 'block in irb_binding': unhandled exception
# #<Thread:0x00007fc3f48c7908 (irb):1 dead>
b = Thread.new{ Thread.stop; raise }
b.... -
Thread
. report _ on _ exception -> bool (39158.0) -
真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
...tderr に報告します。
デフォルトは true です。
```ruby
Thread.new { 1.times { raise } }
```
は $stderr に以下のように出力します:
```text
#<Thread:...> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
2: from -e:1:in `block in......了しないようにするのがより良い方法です。
- [m:Thread#join] や [m:Thread#value] でそのスレッドの終了を待つことが保証できるなら、
スレッド開始時に Thread.current.report_on_exception = false でレポートを無効化しても
安全です。......ていて
終了を待つことができなかったりするかもしれません。
スレッドごとに設定する方法は [m:Thread#report_on_exception=] を参照してください。
- **param** `newstate` -- スレッド実行中に例外発生した場合、その内容を報告す......tderr に報告します。
デフォルトは true です。
```ruby
Thread.new { 1.times { raise } }
```
は $stderr に以下のように出力します:
```text
#<Thread:...> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
2: from -e:1:in 'block in... -
Thread
# report _ on _ exception=(newstate) (27192.0) -
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
...成時の [m:Thread.report_on_exception] です。
- **param** `newstate` -- スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。
```ruby title="例"
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
p a.......true
a.run
# => #<Thread:0x00007fc3f48c7908 (irb):1 run> terminated with exception (report_on_exception is true):
# Traceback (most recent call last):
# (irb):1:in `block in irb_binding': unhandled exception
# #<Thread:0x00007fc3f48c7908 (irb):1 dead>
b = Thread.new{ Thread.stop; raise }
b.......report_on_exception = false
p b.run # => #<Thread:0x00007fc3f48aefc0 (irb):4 dead>
```
- **SEE** [m:Thread.report_on_exception]......true
a.run
# => #<Thread:0x00007fc3f48c7908 (irb):1 run> terminated with exception (report_on_exception is true):
# Traceback (most recent call last):
# (irb):1:in 'block in irb_binding': unhandled exception
# #<Thread:0x00007fc3f48c7908 (irb):1 dead>
b = Thread.new{ Thread.stop; raise }
b.... -
Thread
. report _ on _ exception=(newstate) (27158.0) -
真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
...tderr に報告します。
デフォルトは true です。
```ruby
Thread.new { 1.times { raise } }
```
は $stderr に以下のように出力します:
```text
#<Thread:...> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
2: from -e:1:in `block in......了しないようにするのがより良い方法です。
- [m:Thread#join] や [m:Thread#value] でそのスレッドの終了を待つことが保証できるなら、
スレッド開始時に Thread.current.report_on_exception = false でレポートを無効化しても
安全です。......ていて
終了を待つことができなかったりするかもしれません。
スレッドごとに設定する方法は [m:Thread#report_on_exception=] を参照してください。
- **param** `newstate` -- スレッド実行中に例外発生した場合、その内容を報告す......tderr に報告します。
デフォルトは true です。
```ruby
Thread.new { 1.times { raise } }
```
は $stderr に以下のように出力します:
```text
#<Thread:...> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
2: from -e:1:in 'block in... -
NEWS for Ruby 2
. 4 . 0 (48.0) -
NEWS for Ruby 2.4.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...swapcase] は
全ての Unicode に対して動作するようになりました。[feature:10085]
- [c:Thread]
- [m:Thread#report_on_exception], [m:Thread.report_on_exception] を追加 [feature:6647]
- [c:TracePoint]
- [m:TracePoint#callee_id] を追加 [feature:12747]
- [c:......e#to_time] はタイムゾーンを保つようになりました [bug:12271]
- thread
- the extension library is removed. Till 2.0 it was a pure ruby script
"thread.rb", which has precedence over "thread.so", and has been provided
in $LOADED_FEATURES since 2.1.
- Tk
- 標... -
NEWS for Ruby 2
. 5 . 0 (36.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...[c:IOError]
- [m:IO#close] 以前は"stream closed"というメッセージの例外が発生していましたが、"stream closed in another thread"というメッセージに改良しました。
このメッセージはユーザーにとってわかりやすいでしょう。 [bug:134......10.0.0 に更新しました。 [feature:13685]
- [c:Thread]
- [m:Thread#name=] で設定した名前が Windows 10 で見えるようになりました
- [m:Thread#fetch] を追加 [feature:13009]
- [m:Thread.report_on_exception] のデフォルト値がtrueになりました。...
