aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-10-13 12:58:48 +0900
committerGitHub <noreply@github.com>2017-10-13 12:58:48 +0900
commita254454debf42dd4ab052c90e6434d75f9a5a7c8 (patch)
treeb92a041aba08dc1d75d78f718eca88c14a4229f1 /activejob/lib
parent62ff514d33d3a3b0930956a4b4866e6b228c278c (diff)
parent34d7b05d277e96d31cab40f7818dcc2e8b107a30 (diff)
downloadrails-a254454debf42dd4ab052c90e6434d75f9a5a7c8.tar.gz
rails-a254454debf42dd4ab052c90e6434d75f9a5a7c8.tar.bz2
rails-a254454debf42dd4ab052c90e6434d75f9a5a7c8.zip
Merge pull request #30750 from k2nr/fix-active-job
Yield with an error instance instead of error class
Diffstat (limited to 'activejob/lib')
-rw-r--r--activejob/lib/active_job/exceptions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activejob/lib/active_job/exceptions.rb b/activejob/lib/active_job/exceptions.rb
index dfc74deb1a..8b4a88ba6a 100644
--- a/activejob/lib/active_job/exceptions.rb
+++ b/activejob/lib/active_job/exceptions.rb
@@ -49,7 +49,7 @@ module ActiveJob
retry_job wait: determine_delay(wait), queue: queue, priority: priority
else
if block_given?
- yield self, exception
+ yield self, error
else
logger.error "Stopped retrying #{self.class} due to a #{exception}, which reoccurred on #{executions} attempts. The original exception was #{error.cause.inspect}."
raise error