Permalink
Browse files

Catch all objects thrown like Resque does in lib/resque/job.rb:155

  • Loading branch information...
1 parent b38de54 commit 2e366698908d92d5758f3d827eaeded320c91869 @yaauie committed Oct 27, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/resque_unit/resque.rb
@@ -208,7 +208,7 @@ def perform_with_hooks(job_payload)
# If an exception occurs during the job execution, look for an
# on_failure hook then re-raise.
- rescue => e
+ rescue Object => e
failure_hooks.each { |hook| job_class.send(hook, e, *job_payload["args"]) }
raise e
end

0 comments on commit 2e36669

Please sign in to comment.