forked from LBRYCommunity/lbry-sdk
show and log when an error occurs during shutdown
This commit is contained in:
parent
936c1f2ada
commit
76a5f2f516
1 changed files with 7 additions and 0 deletions
|
@ -108,6 +108,12 @@ class LBRYConsole():
|
|||
|
||||
def _show_start_error(self, error):
|
||||
print error.getErrorMessage()
|
||||
log.error("An error occurred during start up: %s", error.getTraceback())
|
||||
return error
|
||||
|
||||
def _show_shutdown_error(self, error):
|
||||
print error.getErrorMessage()
|
||||
log.error("An error occurred during shutdown: %s", error.getTraceback())
|
||||
return error
|
||||
|
||||
def shut_down(self):
|
||||
|
@ -115,6 +121,7 @@ class LBRYConsole():
|
|||
d = self._shut_down()
|
||||
if self.session is not None:
|
||||
d.addCallback(lambda _: self.session.shut_down())
|
||||
d.addErrback(self._show_shutdown_error)
|
||||
return d
|
||||
|
||||
def add_control_handlers(self, control_handlers):
|
||||
|
|
Loading…
Reference in a new issue