Link rescue_from from modules including Rescuable

Also add some additional words to make it clear that the modules also
implement handling the exceptions configured with rescue_from, because
it was not immediately clear that happened without reading the code.
This commit is contained in:
Hartley McGuire 2023-05-18 12:54:16 -04:00
parent 4d240e0da3
commit d028c14b03
No known key found for this signature in database
GPG Key ID: E823FC1403858A82
5 changed files with 20 additions and 9 deletions

@ -57,7 +57,8 @@ module ActionMailbox
# complete, the status is changed to +delivered+. If a bounce is triggered, then +bounced+. If an unhandled
# exception is bubbled up, then +failed+.
#
# Exceptions can be handled at the class level using the familiar +Rescuable+ approach:
# Exceptions can be handled at the class level using the familiar
# ActiveSupport::Rescuable approach:
#
# class ForwardsMailbox < ApplicationMailbox
# rescue_from(ApplicationSpecificVerificationError) { bounced! }

@ -3,8 +3,10 @@
module ActionMailer # :nodoc:
# = Action Mailer \Rescuable
#
# Provides +rescue_from+ for mailers. Wraps mailer action processing,
# mail job processing, and mail delivery.
# Provides
# {rescue_from}[rdoc-ref:ActiveSupport::Rescuable::ClassMethods#rescue_from]
# for mailers. Wraps mailer action processing, mail job processing, and mail
# delivery to handle configured errors.
module Rescuable
extend ActiveSupport::Concern
include ActiveSupport::Rescuable

@ -3,9 +3,10 @@
module ActionController # :nodoc:
# = Action Controller \Rescue
#
# This module is responsible for providing +rescue_from+ helpers
# to controllers and configuring when detailed exceptions must be
# shown.
# This module is responsible for providing
# {rescue_from}[rdoc-ref:ActiveSupport::Rescuable::ClassMethods#rescue_from]
# to controllers, wrapping actions to handle configured errors, and
# configuring when detailed exceptions must be shown.
module Rescue
extend ActiveSupport::Concern
include ActiveSupport::Rescuable

@ -100,9 +100,10 @@ def discard_on(*exceptions)
end
end
# Reschedules the job to be re-executed. This is useful in combination
# with the +rescue_from+ option. When you rescue an exception from your job
# you can ask Active Job to retry performing your job.
# Reschedules the job to be re-executed. This is useful in combination with
# {rescue_from}[rdoc-ref:ActiveSupport::Rescuable::ClassMethods#rescue_from].
# When you rescue an exception from your job you can ask Active Job to retry
# performing your job.
#
# ==== Options
# * <tt>:wait</tt> - Enqueues the job with the specified delay in seconds

@ -4,6 +4,12 @@
require "active_job/arguments"
module ActiveJob
# = Active Job \Execution
#
# Provides methods to execute jobs immediately, and wraps job execution so
# that exceptions configured with
# {rescue_from}[rdoc-ref:ActiveSupport::Rescuable::ClassMethods#rescue_from]
# are handled.
module Execution
extend ActiveSupport::Concern
include ActiveSupport::Rescuable