bot: show fatal error in logs

master
dece 2 years ago
parent dd3ebcaa35
commit 02399fe96d

@ -118,8 +118,8 @@ class Bot(irc.client.SimpleIRCClient, Logger):
self.start()
except KeyboardInterrupt:
self.log_i("Caught keyboard interrupt.")
except: # Yes, I know, who are you going to call?
self.log_i("Caught unhandled exception.")
except Exception as exc: # Yes, I know, who are you going to call?
self.log_c(f"Caught unhandled exception: {exc}")
finally:
self.cleanup()

Loading…
Cancel
Save