Skip to content

Commit f136f13

Browse files
committed
Pass the exception to the on_failure hook
1 parent 45ad2b4 commit f136f13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/resque/job.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def perform
160160
# If an exception occurs during the job execution, look for an
161161
# on_failure hook then re-raise.
162162
rescue Object => e
163-
failure_hooks.each { |hook| job.send(hook, *job_args) }
163+
failure_hooks.each { |hook| job.send(hook, e, *job_args) }
164164
raise e
165165
end
166166
end

0 commit comments

Comments
 (0)