るりまサーチ

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

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. fileutils cp_r
  5. bigdecimal to_r

ライブラリ

クラス

検索結果

TracePoint#raised_exception -> Exception (27307.0)

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

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

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

TracePoint.new(*events) {|obj| ... } -> TracePoint (3212.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...
...# => #<TracePoint:0x007f17372cdb20>

trace.enable
# => false

puts "Hello, TracePoint!"
# ...
# [69, IRB::Notifier::AbstractNotifier, :printf, :call]
# ...
//}

トレースを無効にするには TracePoint#disable を実行してください。

//emlist[][ruby]{
trace.disable
//}

@param events...
...を String か Symbol で任
意の数指定します。

: :line

式の評価。

: :class

クラス定義、特異クラス定義、モジュール定義への突入。

: :end

クラス定義、特異クラス定義、モジュール定義の終了。

: :call

R
uby で...