labthings_fastapi.exceptions
A submodule for custom LabThings-FastAPI Exceptions.
Exceptions
An invocation was cancelled by the user. |
|
The Thing is not connected to a server. |
Module Contents
- exception labthings_fastapi.exceptions.InvocationCancelledError
Bases:
BaseExceptionAn invocation was cancelled by the user.
Note that this inherits from BaseException so won’t be caught by
except Exception, it must be handled specifically.Action code may want to handle cancellation gracefully. This exception should be propagated if the action’s status should be reported as
cancelled, or it may be handled so that the action finishes, returns a value, and is marked ascompleted.If this exception is handled, the
CancelEventshould be reset to allow anotherInvocationCancelledErrorto be raised if the invocation receives a second cancellation signal.Initialize self. See help(type(self)) for accurate signature.
- exception labthings_fastapi.exceptions.NotConnectedToServerError
Bases:
RuntimeErrorThe Thing is not connected to a server.
This exception is called if a ThingAction is called or is a ThingProperty is updated on a Thing that is not connected to a ThingServer. A server connection is needed to manage asynchronous behaviour.
Initialize self. See help(type(self)) for accurate signature.