Sha256: d62875b57d1e5390d4f0783791a83e634082a473c9d1b51156e1ea547edfa80e

Contents?: true

Size: 654 Bytes

Versions: 13

Compression:

Stored size: 654 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

13 entries across 13 versions & 3 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/actionmailer-7.0.5.1/lib/action_mailer/rescuable.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/actionmailer-7.0.5.1/lib/action_mailer/rescuable.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/actionmailer-7.0.5.1/lib/action_mailer/rescuable.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/actionmailer-7.0.3.1/lib/action_mailer/rescuable.rb
actionmailer-7.0.5.1 lib/action_mailer/rescuable.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/actionmailer-7.0.3.1/lib/action_mailer/rescuable.rb
actionmailer-7.0.5 lib/action_mailer/rescuable.rb
actionmailer-7.0.4.3 lib/action_mailer/rescuable.rb
actionmailer-7.0.4.2 lib/action_mailer/rescuable.rb
actionmailer-7.0.4.1 lib/action_mailer/rescuable.rb
actionmailer-7.0.4 lib/action_mailer/rescuable.rb
actionmailer-7.0.3.1 lib/action_mailer/rescuable.rb
actionmailer-7.0.3 lib/action_mailer/rescuable.rb