Issue #27040: Add loop.get_exception_handler method

This commit is contained in:
Yury Selivanov 2016-05-16 15:20:38 -04:00
parent 7bf36dace8
commit 7ed7ce6ee7
4 changed files with 12 additions and 0 deletions

View file

@ -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.

View file

@ -484,6 +484,9 @@ class AbstractEventLoop:
# Error handlers.
def get_exception_handler(self):
raise NotImplementedError
def set_exception_handler(self, handler):
raise NotImplementedError