From 77847a2b8d8d5dfc0b09df48a010f8bd24bdf379 Mon Sep 17 00:00:00 2001 From: Red-GitHubBot <88117545+Red-GitHubBot@users.noreply.github.com> Date: Thu, 20 Apr 2023 00:13:39 +0200 Subject: [PATCH] [3.4] Fallback to asyncio's default exception handler when possible (#5813) (#6068) Co-authored-by: Jakub Kuczys Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com> --- redbot/__main__.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/redbot/__main__.py b/redbot/__main__.py index 5f343ca0e..43c3e3856 100644 --- a/redbot/__main__.py +++ b/redbot/__main__.py @@ -454,14 +454,7 @@ def global_exception_handler(red, loop, context): # These will get handled later when it *also* kills loop.run_forever if exc is not None and isinstance(exc, (KeyboardInterrupt, SystemExit)): return - # Maybe in the future we should handle some of the other things - # that the default exception handler handles, but this should work fine for now. - log.critical( - "Caught unhandled exception in %s:\n%s", - context.get("future", "event loop"), - context["message"], - exc_info=exc, - ) + loop.default_exception_handler(context) def red_exception_handler(red, red_task: asyncio.Future):