From 2e366698908d92d5758f3d827eaeded320c91869 Mon Sep 17 00:00:00 2001 From: Ryan Biesemeyer Date: Thu, 27 Oct 2011 12:19:30 -0700 Subject: [PATCH] Catch all objects thrown like Resque does in lib/resque/job.rb:155 --- lib/resque_unit/resque.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/resque_unit/resque.rb b/lib/resque_unit/resque.rb index 09063cd..2c3289b 100644 --- a/lib/resque_unit/resque.rb +++ b/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