summaryrefslogtreecommitdiff
path: root/Lib/asyncio
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/base_events.py5
-rw-r--r--Lib/asyncio/events.py3
2 files changed, 8 insertions, 0 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
index 3703480eba..ada178f37f 100644
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -1078,6 +1078,11 @@ class BaseEventLoop(events.AbstractEventLoop):
logger.info('%s: %r' % (debug_log, transport))
return transport, protocol
+ def get_exception_handler(self):
+ """Return an exception handler, or None if the default one is in use.
+ """
+ return self._exception_handler
+
def set_exception_handler(self, handler):
"""Set handler as the new event loop exception handler.
diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py
index 176a846698..8358ebfd4f 100644
--- a/Lib/asyncio/events.py
+++ b/Lib/asyncio/events.py
@@ -484,6 +484,9 @@ class AbstractEventLoop:
# Error handlers.
+ def get_exception_handler(self):
+ raise NotImplementedError
+
def set_exception_handler(self, handler):
raise NotImplementedError