Exceptions

Exceptions raised by Rust adapter and protocol operations.

Invalid arguments raise ValueError (or TypeError/OverflowError for Python type conversions). Deadlines raise built-in TimeoutError; disconnection raises ConnectionError and OS failures raise OSError. These built-in exceptions are independent of AutomotiveError.

NegativeResponseError.code is the exact integer NRC, including unknown values. ProtocolDeviationError.response is the complete response as bytes; deviation describes the failed requirement and its expected/actual values. Transmit-queue clears raise TransmissionCancelledError, distinct from Python task cancellation (asyncio.CancelledError).

exception automotive.errors.AdapterError

A hardware adapter operation failed.

exception automotive.errors.AutomotiveError

Base class for automotive runtime failures.

exception automotive.errors.IsoTPError

An ISO-TP exchange failed.

exception automotive.errors.NegativeResponseError

The ECU rejected a request; code contains its raw NRC.

exception automotive.errors.NotSupportedError

The backend or requested operation is unavailable.

exception automotive.errors.ProtocolDeviationError

A response violated strict validation; response contains the complete PDU.

exception automotive.errors.TransmissionCancelledError

A transmit queue clear invalidated this send.

exception automotive.errors.UDSError

A UDS exchange failed.