PHP 8.2.30
Preview: exceptions.py Size: 1.71 KB
/opt/alt/python313/lib64/python3.13/asyncio/exceptions.py

"""asyncio exceptions."""


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


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


TimeoutError = TimeoutError  # make local alias for the standard exception


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)


class BrokenBarrierError(RuntimeError):
    """Barrier is broken by barrier.abort() call."""

Directory Contents

Dirs: 1 × Files: 33

Name Size Perms Modified Actions
- drwxr-xr-x 2026-02-10 08:06:26
Edit Download
78.87 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
1.93 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
10.10 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
2.61 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
1.38 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
3.26 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
29.09 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
1.71 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
2.66 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
13.83 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
20.10 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
124 B lrw-r--r-- 2026-01-10 10:39:01
Edit Download
481 B lrw-r--r-- 2026-01-10 10:39:01
Edit Download
32.74 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
6.79 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
9.91 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
7.06 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
47.34 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
31.12 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
6.91 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
27.81 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
7.56 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
9.81 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
38.83 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
790 B lrw-r--r-- 2026-01-10 10:39:01
Edit Download
5.92 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
10.55 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
2.42 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
53.14 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
31.87 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
4.94 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
1.19 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download
6.03 KB lrw-r--r-- 2026-01-10 10:39:01
Edit Download

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