asyncio: New error handling API. Issue #20681.
diff --git a/Lib/asyncio/windows_events.py b/Lib/asyncio/windows_events.py
index 0a2d981..c667a1c 100644
--- a/Lib/asyncio/windows_events.py
+++ b/Lib/asyncio/windows_events.py
@@ -156,9 +156,13 @@
if pipe is None:
return
f = self._proactor.accept_pipe(pipe)
- except OSError:
+ except OSError as exc:
if pipe and pipe.fileno() != -1:
- logger.exception('Pipe accept failed')
+ self.call_exception_handler({
+ 'message': 'Pipe accept failed',
+ 'exception': exc,
+ 'pipe': pipe,
+ })
pipe.close()
except futures.CancelledError:
if pipe: