mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
Adds traceback logging to task exception handling (#3517)
This commit is contained in:
parent
8d73838d80
commit
246f9ce17f
@ -430,6 +430,9 @@ def global_exception_handler(red, loop, context):
|
||||
msg = context.get("exception", context["message"])
|
||||
# These will get handled later when it *also* kills loop.run_forever
|
||||
if not isinstance(msg, (KeyboardInterrupt, SystemExit)):
|
||||
if isinstance(msg, Exception):
|
||||
log.critical("Caught unhandled exception in task:\n", exc_info=msg)
|
||||
else:
|
||||
log.critical("Caught unhandled exception in task: %s", msg)
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user