36件ヒット
[1-36件を表示]
(0.023秒)
検索結果
先頭3件
-
UncaughtThrowError
# tag -> object (3.0) -
[m:Kernel?.throw] に指定した tag を返します。
...[m:Kernel?.throw] に指定した tag を返します。
```ruby title="例:"
def do_complicated_things
throw :uncaught_label
end
begin
do_complicated_things
rescue UncaughtThrowError => ex
p ex.tag # => ":uncaught_label"
end
```... -
UncaughtThrowError
# to _ s -> String (3.0) -
self を tag を含む文字列表現にして返します。
...self を tag を含む文字列表現にして返します。
```ruby title="例"
def do_complicated_things
throw :uncaught_label
end
begin
do_complicated_things
rescue UncaughtThrowError => ex
p ex.to_s # => "uncaught throw :uncaught_label"
end
```... -
UncaughtThrowError
# value -> object (3.0) -
[m:Kernel?.throw] に指定した value を返します。
...[m:Kernel?.throw] に指定した value を返します。
```ruby title="例"
def do_complicated_things
throw :uncaught_label, "uncaught_value"
end
begin
do_complicated_things
rescue UncaughtThrowError => ex
p ex.value # => "uncaught_value"
end
```...
