recoverable_exceptions

This module defines recoverable exceptions.

These are exceptions that can occur during the normal execution of a program, for example when the user enters an invalid value, or when a connection to an external resource fails.

These errors will not crash caqtus applications, but instead will be caught and displayed to the user, so that they can fix the error and retry the operation.

Exceptions that are not recoverable will not be caught, and are allowed to crash the applications.

Only make exceptions recoverable if you expect them to happen in normal operation.

Functions

is_recoverable(error)

Check if an error is recoverable.

split_recoverable(exception)

Split an exception into recoverable and non-recoverable parts.

Exceptions

ConnectionFailedError

Raised when a connection to an external resource fails.

EvaluationError

Raised when an error occurs during the evaluation of an expression.

InvalidTypeError

Raised when a value is not of the expected type.

InvalidValueError

Raised when a value is invalid.

NotDefinedUnitError

Raised when the user tries to use a unit that is not defined.

RecoverableException

An error that can be recovered from.

ShotAttemptsExceededError

Raised when the number of shot attempts exceeds the maximum allowed.