labthings_fastapi.exceptions ============================ .. py:module:: labthings_fastapi.exceptions .. autoapi-nested-parse:: A submodule for custom LabThings-FastAPI Exceptions. Exceptions ---------- .. autoapisummary:: labthings_fastapi.exceptions.InvocationCancelledError labthings_fastapi.exceptions.NotConnectedToServerError Module Contents --------------- .. py:exception:: InvocationCancelledError Bases: :py:obj:`BaseException` An 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 as ``completed``. If this exception is handled, the `.CancelEvent` should be reset to allow another `.InvocationCancelledError` to be raised if the invocation receives a second cancellation signal. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: NotConnectedToServerError Bases: :py:obj:`RuntimeError` The 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.