Exceptions
Exceptions definition module.
Here are all the exception classes defined and used by the library.
- exception easynetwork.exceptions.BaseProtocolParseError
Bases:
ExceptionParsing error raised by a protocol object.
- __init__(error: DeserializeError | PacketConversionError) None
- Parameters:
error (DeserializeError | PacketConversionError) – Error instance.
- error: DeserializeError | PacketConversionError
Error instance.
- exception easynetwork.exceptions.BusyResourceError
Bases:
RuntimeErrorError raised when a task attempts to use a resource that some other task is already using, and this would lead to bugs and nonsense.
Mostly used in asynchronous functions.
- exception easynetwork.exceptions.ClientClosedError
Bases:
ConnectionErrorError raised when trying to do an operation on a closed client.
- exception easynetwork.exceptions.DatagramProtocolParseError
Bases:
BaseProtocolParseErrorParsing error raised by
easynetwork.protocol.DatagramProtocol.
- exception easynetwork.exceptions.DeserializeError
Bases:
ExceptionError raised by a serializer if the data format is invalid.
- exception easynetwork.exceptions.IncrementalDeserializeError
Bases:
DeserializeErrorError raised by an incremental serializer if the data format is invalid.
- __init__(message: str, remaining_data: bytes | bytearray | memoryview | collections.abc.Buffer, error_info: Any = None) None
- Parameters:
message (str) – Error message.
remaining_data (bytes | bytearray | memoryview | collections.abc.Buffer) – Unused trailing data.
error_info (Any) – Additional error data.
- remaining_data: ReadableBuffer
Unused trailing data.
- exception easynetwork.exceptions.LimitOverrunError
Bases:
IncrementalDeserializeErrorReached the buffer size limit while looking for a separator.
- __init__(message: str, buffer: bytes | bytearray | memoryview | collections.abc.Buffer, consumed: int, separator: bytes = b'') None
- Parameters:
message (str) – Error message.
buffer (bytes | bytearray | memoryview | collections.abc.Buffer) – Currently too big buffer.
consumed (int) – Total number of to be consumed bytes.
separator (bytes) – Searched separator.
- exception easynetwork.exceptions.PacketConversionError
Bases:
ExceptionThe deserialized packet is invalid.
- exception easynetwork.exceptions.ServerAlreadyRunning
Bases:
RuntimeErrorThe server is already running.
- exception easynetwork.exceptions.ServerClosedError
Bases:
RuntimeErrorError raised when trying to do an operation on a closed server.
- exception easynetwork.exceptions.StreamProtocolParseError
Bases:
BaseProtocolParseErrorParsing error raised by
easynetwork.protocol.StreamProtocol.- __init__(remaining_data: bytes | bytearray | memoryview | collections.abc.Buffer, error: IncrementalDeserializeError | PacketConversionError) None
- Parameters:
remaining_data (bytes | bytearray | memoryview | collections.abc.Buffer) – Unused trailing data.
error (IncrementalDeserializeError | PacketConversionError) – Error instance.
- error: IncrementalDeserializeError | PacketConversionError
Error instance.
- remaining_data: ReadableBuffer
Unused trailing data.
- exception easynetwork.exceptions.TypedAttributeLookupError
Bases:
LookupErrorRaised by
extra()when the given typed attribute is not found and no default value has been given.
- exception easynetwork.exceptions.UnsupportedOperation
Bases:
NotImplementedErrorThe requested action is currently unavailable.