Sha256: 18c3b22cc5ac73c1eca9327d2903bd22ecb85211e9fccb3fdd7c8fe003885421

Contents?: true

Size: 786 Bytes

Versions: 40

Compression:

Stored size: 786 Bytes

Contents

# frozen_string_literal: true

module ActionMailer # :nodoc:
  # = Action Mailer \Rescuable
  #
  # 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

    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

40 entries across 40 versions & 5 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/actionmailer-7.1.3.4/lib/action_mailer/rescuable.rb
actionmailer-8.0.1 lib/action_mailer/rescuable.rb
actionmailer-8.0.0.1 lib/action_mailer/rescuable.rb
actionmailer-7.2.2.1 lib/action_mailer/rescuable.rb
actionmailer-7.1.5.1 lib/action_mailer/rescuable.rb
actionmailer-8.0.0 lib/action_mailer/rescuable.rb
actionmailer-7.2.2 lib/action_mailer/rescuable.rb
actionmailer-7.1.5 lib/action_mailer/rescuable.rb
actionmailer-8.0.0.rc2 lib/action_mailer/rescuable.rb
actionmailer-7.2.1.2 lib/action_mailer/rescuable.rb
actionmailer-7.1.4.2 lib/action_mailer/rescuable.rb
actionmailer-8.0.0.rc1 lib/action_mailer/rescuable.rb
actionmailer-7.2.1.1 lib/action_mailer/rescuable.rb
actionmailer-7.1.4.1 lib/action_mailer/rescuable.rb
actionmailer-8.0.0.beta1 lib/action_mailer/rescuable.rb
omg-actionmailer-8.0.0.alpha9 lib/action_mailer/rescuable.rb
omg-actionmailer-8.0.0.alpha8 lib/action_mailer/rescuable.rb
omg-actionmailer-8.0.0.alpha7 lib/action_mailer/rescuable.rb
omg-actionmailer-8.0.0.alpha4 lib/action_mailer/rescuable.rb
omg-actionmailer-8.0.0.alpha3 lib/action_mailer/rescuable.rb