MCPcopy
hub / github.com/aio-libs/aiohttp / set_exception

Method set_exception

aiohttp/parsers.py:119–130  ·  view source on GitHub ↗
(self, exc)

Source from the content-addressed store, hash-verified

117 return self._exception
118
119 def set_exception(self, exc):
120 if isinstance(exc, ConnectionError):
121 exc, old_exc = self._eof_exc_class(), exc
122 exc.__cause__ = old_exc
123 exc.__context__ = old_exc
124
125 self._exception = exc
126
127 if self._output is not None:
128 self._output.set_exception(exc)
129 self._output = None
130 self._parser = None
131
132 def feed_data(self, data):
133 """send data to current parser or store in buffer."""

Callers 9

test_exceptionFunction · 0.95
test_exception_waiterFunction · 0.95
feed_dataMethod · 0.45
feed_eofMethod · 0.45
set_parserMethod · 0.45
unset_parserMethod · 0.45
connection_lostMethod · 0.45

Calls

no outgoing calls

Tested by 4

test_exceptionFunction · 0.76
test_exception_waiterFunction · 0.76