aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib
diff options
context:
space:
mode:
authorKazunori Kajihiro <kazunori.kajihiro@gmail.com>2017-09-29 18:15:56 +0900
committerKazunori Kajihiro <kazunori.kajihiro@gmail.com>2017-09-29 18:15:56 +0900
commit4a13c1e1d2496657f35a7a35092d1b403fe03526 (patch)
tree47b07d53c7ee958facd0f979bc9dbdf6237656cc /activejob/lib
parentd30586211b41e018869a1a3f4e3af778a31591db (diff)
downloadrails-4a13c1e1d2496657f35a7a35092d1b403fe03526.tar.gz
rails-4a13c1e1d2496657f35a7a35092d1b403fe03526.tar.bz2
rails-4a13c1e1d2496657f35a7a35092d1b403fe03526.zip
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