异常¶
源代码: Lib/asyncio/exceptions.py
- exception asyncio.TimeoutError¶
- A deprecated alias of - TimeoutError, raised when the operation has exceeded the given deadline.- 在 3.11 版更改: This class was made an alias of - TimeoutError.
- exception asyncio.CancelledError¶
- 该操作已被取消。 - 取消asyncio任务时,可以捕获此异常以执行自定义操作。在几乎所有情况下,都必须重新引发异常。 - 在 3.8 版更改: - CancelledErroris now a subclass of- BaseExceptionrather than- Exception.
- exception asyncio.SendfileNotAvailableError¶
- "sendfile" 系统调用不适用于给定的套接字或文件类型。 - 子类 - RuntimeError。
- exception asyncio.IncompleteReadError¶
- 请求的读取操作未完全完成。 - 由 asyncio stream APIs 提出 - 此异常是 - EOFError的子类。
- exception asyncio.LimitOverrunError¶
- 在查找分隔符时达到缓冲区大小限制。 - 由 asyncio stream APIs 提出 - consumed¶
- 要消耗的字节总数。