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
|
@ -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…
Reference in New Issue