Sha256: ad47a31ddbfe880d0999e15a175fccd839307854ccd2deee6a70d56bf75518a5

Contents?: true

Size: 652 Bytes

Versions: 14

Compression:

Stored size: 652 Bytes

Contents

# frozen_string_literal: true

module ActionMailer # :nodoc:
  # Provides +rescue_from+ for mailers. Wraps mailer action processing,
  # mail job processing, and mail delivery.
  module Rescuable
    extend ActiveSupport::Concern
    include ActiveSupport::Rescuable

    class_methods do
      def handle_exception(exception) # :nodoc:
        rescue_with_handler(exception) || raise(exception)
      end
    end

    def handle_exceptions # :nodoc:
      yield
    rescue => exception
      rescue_with_handler(exception) || raise
    end

    private
      def process(*)
        handle_exceptions do
          super
        end
      end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/actionmailer-7.0.2.3/lib/action_mailer/rescuable.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/actionmailer-7.0.2.3/lib/action_mailer/rescuable.rb
actionmailer-7.0.2.4 lib/action_mailer/rescuable.rb
actionmailer-7.0.2.3 lib/action_mailer/rescuable.rb
actionmailer-7.0.2.2 lib/action_mailer/rescuable.rb
actionmailer-7.0.2.1 lib/action_mailer/rescuable.rb
actionmailer-7.0.2 lib/action_mailer/rescuable.rb
actionmailer-7.0.1 lib/action_mailer/rescuable.rb
actionmailer-7.0.0 lib/action_mailer/rescuable.rb
actionmailer-7.0.0.rc3 lib/action_mailer/rescuable.rb
actionmailer-7.0.0.rc2 lib/action_mailer/rescuable.rb
actionmailer-7.0.0.rc1 lib/action_mailer/rescuable.rb
actionmailer-7.0.0.alpha2 lib/action_mailer/rescuable.rb
actionmailer-7.0.0.alpha1 lib/action_mailer/rescuable.rb