Exceptions
Exceptions definition module.
Here are all the exception classes defined and used by the library.
- exception easynetwork.exceptions.BaseProtocolParseError(error)
Bases:
Exception
Parsing error raised by a protocol object.
- Parameters:
error (DeserializeError | PacketConversionError) – Error instance.
- error: DeserializeError | PacketConversionError
Error instance.
- exception easynetwork.exceptions.BusyResourceError
Bases:
RuntimeError
Error 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:
ConnectionError
Error raised when trying to do an operation on a closed client.
- exception easynetwork.exceptions.DatagramProtocolParseError(error)
Bases:
BaseProtocolParseError
Parsing error raised by
easynetwork.protocol.DatagramProtocol
.- Parameters:
error (DeserializeError | PacketConversionError) – Error instance.
- exception easynetwork.exceptions.DeserializeError(message, error_info=None)
Bases:
Exception
Error raised by a serializer if the data format is invalid.
- Parameters:
message (str) – Error message.
error_info (Any) – Additional error data.
- exception easynetwork.exceptions.IncrementalDeserializeError(message, remaining_data, error_info=None)
Bases:
DeserializeError
Error raised by an incremental serializer if the data format is invalid.
- Parameters:
- remaining_data: bytes | bytearray | memoryview
Unused trailing data.
- exception easynetwork.exceptions.LimitOverrunError(message, buffer, consumed, separator=b'')
Bases:
IncrementalDeserializeError
Reached the buffer size limit while looking for a separator.
- Parameters:
- exception easynetwork.exceptions.PacketConversionError(message, error_info=None)
Bases:
Exception
The deserialized packet is invalid.
- Parameters:
message (str) – Error message.
error_info (Any) – Additional error data.
- exception easynetwork.exceptions.ServerAlreadyRunning
Bases:
RuntimeError
The server is already running.
- exception easynetwork.exceptions.ServerClosedError
Bases:
RuntimeError
Error raised when trying to do an operation on a closed server.
- exception easynetwork.exceptions.StreamProtocolParseError(remaining_data, error)
Bases:
BaseProtocolParseError
Parsing error raised by
easynetwork.protocol.StreamProtocol
.- Parameters:
remaining_data (ReadableBuffer) – Unused trailing data.
error (DeserializeError | PacketConversionError) – Error instance.
- error: IncrementalDeserializeError | PacketConversionError
Error instance.
- remaining_data: bytes | bytearray | memoryview
Unused trailing data.
- exception easynetwork.exceptions.TypedAttributeLookupError
Bases:
LookupError
Raised by
extra()
when the given typed attribute is not found and no default value has been given.
- exception easynetwork.exceptions.UnsupportedOperation
Bases:
NotImplementedError
The requested action is currently unavailable.