Log any unhandled (critical) exceptions that happen under bot.run()
in
start.py
This commit is contained in:
parent
6d6bfa3262
commit
9e8db0ec62
1 changed files with 6 additions and 1 deletions
7
start.py
7
start.py
|
@ -70,7 +70,12 @@ if len(server_configs):
|
|||
sys.stderr.write("failed to connect to '%s', exiting\r\n" % (
|
||||
str(server)))
|
||||
sys.exit(1)
|
||||
bot.run()
|
||||
|
||||
try:
|
||||
bot.run()
|
||||
except Exception as e:
|
||||
log.critical("Unhandled exception: %s", [str(e)], exc_info=True)
|
||||
sys.exit(1)
|
||||
else:
|
||||
try:
|
||||
if utils.cli.bool_input("no servers found, add one?"):
|
||||
|
|
Loading…
Reference in a new issue