PHP 8.2.30
Preview: exceptions.py Size: 1.59 KB
//usr/lib64/python3.8/asyncio/exceptions.py

"""asyncio exceptions."""


__all__ = ('CancelledError', 'InvalidStateError', 'TimeoutError',
           'IncompleteReadError', 'LimitOverrunError',
           'SendfileNotAvailableError')


class CancelledError(BaseException):
    """The Future or Task was cancelled."""


class TimeoutError(Exception):
    """The operation exceeded the given deadline."""


class InvalidStateError(Exception):
    """The operation is not allowed in this state."""


class SendfileNotAvailableError(RuntimeError):
    """Sendfile syscall is not available.

    Raised if OS does not support sendfile syscall for given socket or
    file type.
    """


class IncompleteReadError(EOFError):
    """
    Incomplete read error. Attributes:

    - partial: read bytes string before the end of stream was reached
    - expected: total number of expected bytes (or None if unknown)
    """
    def __init__(self, partial, expected):
        r_expected = 'undefined' if expected is None else repr(expected)
        super().__init__(f'{len(partial)} bytes read on a total of '
                         f'{r_expected} expected bytes')
        self.partial = partial
        self.expected = expected

    def __reduce__(self):
        return type(self), (self.partial, self.expected)


class LimitOverrunError(Exception):
    """Reached the buffer limit while looking for a separator.

    Attributes:
    - consumed: total number of to be consumed bytes.
    """
    def __init__(self, message, consumed):
        super().__init__(message)
        self.consumed = consumed

    def __reduce__(self):
        return type(self), (self.args[0], self.consumed)

Directory Contents

Dirs: 1 × Files: 29

Name Size Perms Modified Actions
- drwxr-xr-x 2024-03-21 10:19:17
Edit Download
70.92 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
2.51 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
8.64 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
2.41 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
888 B lrw-r--r-- 2023-06-06 13:32:21
Edit Download
8.59 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
25.55 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
1.59 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
2.35 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
12.85 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
16.87 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
124 B lrw-r--r-- 2023-06-06 13:32:21
Edit Download
31.31 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
6.97 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
8.03 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
2.01 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
38.08 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
26.57 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
5.85 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
26.03 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
7.88 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
33.13 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
10.24 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
5.74 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
47.96 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
32.10 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
4.94 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
1.20 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download
3.26 KB lrw-r--r-- 2023-06-06 13:32:21
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).