2023-01-16 11:26:05 +01:00
|
|
|
# Inherit from `Exception` instead of `StandardError`
|
|
|
|
# because this error is raised in a `rescue_from StandardError`,
|
|
|
|
# so it would be shallowed otherwise.
|
|
|
|
#
|
|
|
|
# TODO: add a test which verify that the error will permit the job to retry
|
2023-02-02 15:59:18 +01:00
|
|
|
class MailDeliveryError < Exception # rubocop:disable Lint/InheritException
|
|
|
|
def initialize(original_exception)
|
|
|
|
super(original_exception.message)
|
|
|
|
|
|
|
|
set_backtrace(original_exception.backtrace)
|
|
|
|
end
|
|
|
|
end
|