Exceptions¶
Exception hierarchy¶
aio_ld2410.exceptions defines the following hierarchy of exceptions.
Base exceptions¶
These exceptions are never raised but are used as a base for others.
- exception aio_ld2410.exceptions.BaseAioLd2410Error[source]¶
Bases:
BaseExceptionBase error for all exceptions originating from this library.
- exception aio_ld2410.exceptions.AioLd2410Error[source]¶
Bases:
Exception,BaseAioLd2410ErrorBase error for all things that users would like to catch.
- exception aio_ld2410.exceptions.CommandError[source]¶
Bases:
AioLd2410ErrorBase error for everything related to commands sent to the device.
General exceptions¶
These are raised when there is a global issue with the device.
- exception aio_ld2410.exceptions.ConnectionClosedError[source]¶
Bases:
ConnectionError,AioLd2410ErrorRaised when we lost the connection to the target module.
The only relevant action afterward is to close the current client.
Command exceptions¶
These exceptions can be raised consequently to a command method.
- exception aio_ld2410.exceptions.CommandContextError[source]¶
Bases:
CommandErrorRaised when a command was issued outside of a configuration context.
- exception aio_ld2410.exceptions.CommandParamError[source]¶
Bases:
CommandErrorRaised when command parameters are not suitable for the device.
- exception aio_ld2410.exceptions.CommandReplyError[source]¶
Bases:
CommandErrorRaised when the device replied with something we could not understand.
- exception aio_ld2410.exceptions.CommandStatusError[source]¶
Bases:
CommandErrorRaised after a failed status was received from device.
Internal exceptions¶
- exception aio_ld2410.exceptions.ModuleRestartedError[source]¶
Bases:
BaseAioLd2410ErrorRaised when the module is being restarted.
It is used internally to close the current configuration context.
When the exception is asked from
LD2410.restart_module(), make sure not to catch it.