instance method UncaughtThrowError#to_s

to_s -> String[permalink][rdoc][edit]

self を tag を含む文字列表現にして返します。



def do_complicated_things
  throw :uncaught_label
end

begin
  do_complicated_things
rescue UncaughtThrowError => ex
  p ex.to_s # => "uncaught throw :uncaught_label"
end