bot: show fatal error in logs

This commit is contained in:
dece 2022-05-19 14:12:20 +02:00
parent dd3ebcaa35
commit 02399fe96d

View file

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