异常

源代码: Lib/asyncio/exceptions.py


exception asyncio. TimeoutError

被弃用别名化的 TimeoutError ,被引发当操作超过给定截止日期时。

3.11 版改变: 此类是别名化的 TimeoutError .

exception asyncio. CancelledError

操作已被取消。

This exception can be caught to perform custom operations when asyncio Tasks are cancelled. In almost all situations the exception must be re-raised.

3.8 版改变: CancelledError 现在是子类化的 BaseException .

exception asyncio. InvalidStateError

Invalid internal state of Task or Future .

Can be raised in situations like setting a result value for a Future object that already has a result value set.

exception asyncio. SendfileNotAvailableError

The “sendfile” syscall is not available for the given socket or file type.

子类化的 RuntimeError .

exception asyncio. IncompleteReadError

The requested read operation did not complete fully.

Raised by the asyncio 流 API .

This exception is a subclass of EOFError .

expected

The total number ( int ) of expected bytes.

partial

A string of bytes read before the end of stream was reached.

exception asyncio. LimitOverrunError

Reached the buffer size limit while looking for a separator.

Raised by the asyncio 流 API .

consumed

The total number of to be consumed bytes.

上一话题

队列

下一话题

事件循环

本页