diff --git a/redbot/__main__.py b/redbot/__main__.py index a15b9d2a6..d0abd0643 100644 --- a/redbot/__main__.py +++ b/redbot/__main__.py @@ -430,7 +430,10 @@ 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)): - log.critical("Caught unhandled exception in task: %s", msg) + 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) def red_exception_handler(red, red_task: asyncio.Future):