異常?

源代碼: 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任務(wù)時(shí),可以捕獲此異常以執行自定義操作。在幾乎所有情況下,都必須重新引發(fā)異常。

在 3.8 版更改: CancelledError 現在是 BaseException 的子類(lèi)。

exception asyncio.InvalidStateError?

TaskFuture 的內部狀態(tài)無(wú)效。

在為已設置結果值的未來(lái)對象設置結果值等情況下,可以引發(fā)此問(wèn)題。

exception asyncio.SendfileNotAvailableError?

"sendfile" 系統調用不適用于給定的套接字或文件類(lèi)型。

子類(lèi) RuntimeError 。

exception asyncio.IncompleteReadError?

請求的讀取操作未完全完成。

asyncio stream APIs 提出

此異常是 EOFError 的子類(lèi)。

expected?

預期字節的總數( int )。

partial?

到達流結束之前讀取的 bytes 字符串。

exception asyncio.LimitOverrunError?

在查找分隔符時(shí)達到緩沖區大小限制。

asyncio stream APIs 提出

consumed?

要消耗的字節總數。