MCPcopy Index your code
hub / github.com/python/cpython / set_exception

Method set_exception

Lib/asyncio/streams.py:457–464  ·  view source on GitHub ↗
(self, exc)

Source from the content-addressed store, hash-verified

455 return self._exception
456
457 def set_exception(self, exc):
458 self._exception = exc
459
460 waiter = self._waiter
461 if waiter is not None:
462 self._waiter = None
463 if not waiter.cancelled():
464 waiter.set_exception(exc)
465
466 def _wakeup_waiter(self):
467 """Wakeup read*() functions waiting for data or EOF."""

Callers 8

test_read_exceptionMethod · 0.95
test_exceptionMethod · 0.95
test_exception_cancelMethod · 0.95
connection_lostMethod · 0.45
connection_lostMethod · 0.45

Calls 1

cancelledMethod · 0.45

Tested by 6

test_read_exceptionMethod · 0.76
test_exceptionMethod · 0.76
test_exception_cancelMethod · 0.76