Module: LogStruct::Integrations::ActionMailer::ErrorHandling::ClassMethods
- Extended by:
- T::Sig
- Defined in:
- lib/log_struct/integrations/action_mailer/error_handling.rb
Overview
ActionMailer::MailDeliveryJob passes errors to the mailer class (handle_exception), which
looks the rescue_from handlers up on the class, so the handlers are defined there too.
(ActiveSupport::Concern extends the class with ClassMethods when it's included or prepended.)
Instance Method Summary collapse
-
#log_and_ignore_error(ex) ⇒ void
Logs the error, and doesn't report or raise it.
-
#log_and_report_error(ex) ⇒ void
Logs and reports the error, and doesn't raise it.
-
#log_and_reraise_error(ex) ⇒ void
Logs the error and raises it again, reporting it too in the Report modes.
Instance Method Details
#log_and_ignore_error(ex) ⇒ void
This method returns an undefined value.
Logs the error, and doesn't report or raise it
26 27 28 |
# File 'lib/log_struct/integrations/action_mailer/error_handling.rb', line 26 def log_and_ignore_error(ex) ErrorHandling.handle_mailer_class_error(self, ex, report: false, reraise: false) end |
#log_and_report_error(ex) ⇒ void
This method returns an undefined value.
Logs and reports the error, and doesn't raise it
32 33 34 |
# File 'lib/log_struct/integrations/action_mailer/error_handling.rb', line 32 def log_and_report_error(ex) ErrorHandling.handle_mailer_class_error(self, ex, report: true, reraise: false) end |
#log_and_reraise_error(ex) ⇒ void
This method returns an undefined value.
Logs the error and raises it again, reporting it too in the Report modes
38 39 40 |
# File 'lib/log_struct/integrations/action_mailer/error_handling.rb', line 38 def log_and_reraise_error(ex) ErrorHandling.handle_mailer_class_error(self, ex, report: ErrorHandling.report_before_reraise?, reraise: true) end |