るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.023秒)
トップページ > クラス:TracePoint[x] > クエリ:raise[x] > クエリ:runtimeerror[x] > クエリ:raised_exception[x]

別のキーワード

  1. _builtin runtimeerror
  2. raise runtimeerror
  3. fail runtimeerror
  4. enable runtimeerror
  5. open runtimeerror

ライブラリ

検索結果

TracePoint#raised_exception -> Exception (24232.0)

発生した例外を返します。

...生した例外を返します。

@raise RuntimeError :raise イベントのためのイベントフックの外側で実行し
た場合に発生します。

//emlist[例][ruby]{
trace = TracePoint.new(:raise) do |tp|
tp.raised_exception # => #<ZeroDivisionError: divided by...

TracePoint.new(*events) {|obj| ... } -> TracePoint (49.0)

新しい TracePoint オブジェクトを作成して返します。トレースを有効 にするには TracePoint#enable を実行してください。

...新しい TracePoint オブジェクトを作成して返します。トレースを有効
にするには TracePoint#enable を実行してください。

//emlist[例:irb で実行した場合][ruby]{
trace = TracePoint.new(:call) do |tp|
p [tp.lineno, tp.defined_class, tp.method_id, tp.even...
...call

C で記述されたメソッドの呼び出し。

: :c_return

C で記述されたメソッド呼び出しからのリターン。

: :raise

例外の発生。

: :b_call

ブロックの開始。

: :b_return

ブロックの終了。

: :thread_begin

スレッドの開始。...
...][ruby]{
TracePoint
.trace(:line) do |tp|
p tp.raised_exception
end
# => RuntimeError: 'raised_exception' not supported by this event
//}

イベントフックの外側で、発生したイベントに関連する情報を取得するメソッ
ドを実行した場合には RuntimeError が発...
...連しない情報を取得するメソッドを実行した場合には
RuntimeError
が発生します。

//emlist[例][ruby]{
TracePoint
.trace(:line) do |tp|
p tp.raised_exception
end
# => RuntimeError: 'raised_exception' not supported by this event
//}

イベントフックの外側で、...