Exceptions

Exceptions raised by improv-client.

Every exception derives from ImprovError, so a single except ImprovError catches anything the library raises on purpose.

exception improv_client.exceptions.ImprovError[source]

Bases: Exception

Base class for all improv-client errors.

exception improv_client.exceptions.ImprovProtocolError[source]

Bases: ImprovError

Data received from the device could not be parsed.

exception improv_client.exceptions.ImprovConnectionError[source]

Bases: ImprovError

Connecting to the device failed, or the connection was lost.

exception improv_client.exceptions.ImprovTimeoutError[source]

Bases: ImprovError, TimeoutError

The device did not answer in time.

exception improv_client.exceptions.ImprovNotSupportedError[source]

Bases: ImprovError

The device does not support the requested command.

Raised before sending when the BLE capabilities say the command isn’t supported, and when the device answers with UNKNOWN_RPC_COMMAND.

exception improv_client.exceptions.ImprovDeviceError(error, message=None)[source]

Bases: ImprovError

The device reported an error state.

Variables:

error (improv_client.protocol.Error) – The error code reported by the device.

Parameters:
Return type:

None