1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #40984 from alecclarke/update-active-support-rescuable-docs

Clarify use of rescue_from [ci skip]
This commit is contained in:
Rafael França 2020-12-30 16:06:04 -05:00 committed by GitHub
commit e19f95f219
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,12 +14,12 @@ module ActiveSupport
end
module ClassMethods
# Rescue exceptions raised in controller actions.
# Registers exception classes with a handler to be called by <tt>rescue_with_handler</tt>.
#
# <tt>rescue_from</tt> receives a series of exception classes or class
# names, and a trailing <tt>:with</tt> option with the name of a method
# or a Proc object to be called to handle them. Alternatively a block can
# be given.
# names, and an exception handler specified by a trailing <tt>:with</tt>
# option containing the name of a method or a Proc object. Alternatively, a block
# can be given as the handler.
#
# Handlers that take one argument will be called with the exception, so
# that the exception can be inspected when dealing with it.