method
catch_and_raise
v7.2.3 -
Show latest stable
- Class:
ActiveSupport::Messages::Codec
catch_and_raise(throwable, as: nil, &block)private
No documentation available.
# File activesupport/lib/active_support/messages/codec.rb, line 52
def catch_and_raise(throwable, as: nil, &block)
error = catch throwable do
return block.call
end
error = as.new(error.to_s) if as
raise error
end