From 4a13c1e1d2496657f35a7a35092d1b403fe03526 Mon Sep 17 00:00:00 2001 From: Kazunori Kajihiro Date: Fri, 29 Sep 2017 18:15:56 +0900 Subject: Yield with an error instance instead of error class --- activejob/lib/active_job/exceptions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activejob/lib/active_job/exceptions.rb') 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 -- cgit v1.2.3