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:
parent
b75b9491af
commit
cb7c3a7530
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue