Raise an exception in the asynchronous generator. Return next yielded value or raise StopAsyncIteration.
(self, typ, val=None, tb=None)
| 248 | |
| 249 | @abstractmethod |
| 250 | async def athrow(self, typ, val=None, tb=None): |
| 251 | """Raise an exception in the asynchronous generator. |
| 252 | Return next yielded value or raise StopAsyncIteration. |
| 253 | """ |
| 254 | if val is None: |
| 255 | if tb is None: |
| 256 | raise typ |
| 257 | val = typ() |
| 258 | if tb is not None: |
| 259 | val = val.with_traceback(tb) |
| 260 | raise val |
| 261 | |
| 262 | async def aclose(self): |
| 263 | """Raise GeneratorExit inside coroutine. |