aboutsummaryrefslogtreecommitdiffstats
path: root/activejob
diff options
context:
space:
mode:
Diffstat (limited to 'activejob')
-rw-r--r--activejob/lib/active_job/exceptions.rb3
-rw-r--r--activejob/test/cases/exceptions_test.rb2
2 files changed, 3 insertions, 2 deletions
diff --git a/activejob/lib/active_job/exceptions.rb b/activejob/lib/active_job/exceptions.rb
index eead8daae3..6b43a8bcb5 100644
--- a/activejob/lib/active_job/exceptions.rb
+++ b/activejob/lib/active_job/exceptions.rb
@@ -32,7 +32,8 @@ module ActiveJob
logger.error "Retrying #{self.class} in #{wait} seconds, due to a #{exception}. The original exception was #{error.cause.inspect}."
retry_job wait: wait, queue: queue, priority: priority
else
- logger.error "Discarded #{self.class} due to a #{exception} which reoccurred on #{executions} attempts. The original exception was #{error.cause.inspect}."
+ logger.error "Stopped retrying #{self.class} due to a #{exception}, which reoccurred on #{executions} attempts. The original exception was #{error.cause.inspect}."
+ raise error
end
end
end
diff --git a/activejob/test/cases/exceptions_test.rb b/activejob/test/cases/exceptions_test.rb
index 43f16b6e59..b120a580fa 100644
--- a/activejob/test/cases/exceptions_test.rb
+++ b/activejob/test/cases/exceptions_test.rb
@@ -35,7 +35,7 @@ class ExceptionsTest < ActiveSupport::TestCase
begin
RetryJob.perform_later 'VerySeriousError', 11
assert_equal "Raised VerySeriousError for the 10th time", JobBuffer.last_value
- rescue SeriousError
+ rescue VerySeriousError
pass
end
end