1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Use error handler(s) from CLI launch failure (#4581)

* Use error handler(s) from CLI launch failure

* Fix comparison operator
This commit is contained in:
Takashi M 2020-05-27 09:42:45 -07:00 committed by GitHub
parent b75b9491af
commit cb7c3a7530
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,7 +31,12 @@ begin
cli.run
rescue => e
raise e if $DEBUG
STDERR.puts e.message
STDERR.puts e.backtrace.join("\n")
if Sidekiq.error_handlers.length == 0
STDERR.puts e.message
STDERR.puts e.backtrace.join("\n")
else
cli.handle_exception e
end
exit 1
end