mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
asyncio: New error handling API. Issue #20681.
This commit is contained in:
parent
065efc3072
commit
ff827f08ac
15 changed files with 491 additions and 99 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue