Skip to content

Commit

Permalink
catch all exceptions, not just those that inherit from StandardError
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler Kovacs committed Aug 28, 2013
1 parent 8496fac commit dbe83c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/sidekiq/failures/middleware.rb
Expand Up @@ -10,7 +10,7 @@ def call(worker, msg, queue)
yield
rescue Sidekiq::Shutdown
raise
rescue => e
rescue Exception => e
raise e if skip_failure?

data = {
Expand Down
2 changes: 1 addition & 1 deletion test/middleware_test.rb
Expand Up @@ -13,7 +13,7 @@ module Failures
Sidekiq.instance_eval { @failures_default_mode = nil }
end

TestException = Class.new(StandardError)
TestException = Class.new(Exception)
ShutdownException = Class.new(Sidekiq::Shutdown)

class MockWorker
Expand Down

0 comments on commit dbe83c0

Please sign in to comment.