asyncio: New error handling API. Issue #20681.

This commit is contained in:
Yury Selivanov 2014-02-18 18:02:19 -05:00
parent 065efc3072
commit ff827f08ac
15 changed files with 491 additions and 99 deletions

View file

@ -156,9 +156,13 @@ class ProactorEventLoop(proactor_events.BaseProactorEventLoop):
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: