instance method
rescue_with_handler
Ruby on Rails 4.0.13
Since v2.2.3Signature
rescue_with_handler(exception)
Tries to rescue the exception by looking up and calling a registered handler.
Parameters
-
exceptionreq
Source
# File activesupport/lib/active_support/rescuable.rb, line 78
def rescue_with_handler(exception)
if handler = handler_for_rescue(exception)
handler.arity != 0 ? handler.call(exception) : handler.call
true # don't rely on the return value of the handler
end
end
Defined in activesupport/lib/active_support/rescuable.rb line 78
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Rescuable