るりまサーチ

最速Rubyリファレンスマニュアル検索!
20件ヒット [1-20件を表示] (0.131秒)
トップページ > クエリ:Kernel.#p[x] > クエリ:$5[x] > クエリ:cpp_command[x] > クエリ:NEWS for Ruby 3.1.0[x] > クラス:UncaughtThrowError[x]

別のキーワード

  1. argf.class lines
  2. argf.class each
  3. argf.class each_line
  4. argf.class readline
  5. argf.class to_a

ライブラリ

キーワード

検索結果

UncaughtThrowError#tag -> object (23.0)

Kernel.#throw に指定した tag を返します。

...
Kernel
.#throw に指定した tag を返します。

//emlist[例:][ruby]{
def do_complicated_things
throw :uncaught_label
end

begin
do_complicated_things
rescue UncaughtThrowError => ex
p
ex.tag # => ":uncaught_label"
end
//}...

UncaughtThrowError#value -> object (23.0)

Kernel.#throw に指定した value を返します。

...
Kernel
.#throw に指定した value を返します。

//emlist[例][ruby]{
def do_complicated_things
throw :uncaught_label, "uncaught_value"
end

begin
do_complicated_things
rescue UncaughtThrowError => ex
p
ex.value # => "uncaught_value"
end
//}...