Errors
- class niveristand.errors.VeristandError
The base class for all VeriStandErrors.
Note: This class generates a
VeristandError
if a more specific error cannot be determined.
- class niveristand.errors.TranslateError
Bases:
VeristandError
Raised if a Python function fails to translate to a VeriStand real-time sequence.
- class niveristand.errors.SequenceError(error_code, message, error_action)
Raised by
generate_error
to report a sequence failure.- property inner_error
Returns the error generated before the most recent error, if any, or None.
- Returns:
the previous error generated by this sequence.
- Return type:
Real-time sequences report only the last error the sequence generates. If you want to see a list of all the inner errors, use
RunError.get_all_errors
.
- property is_fatal
Returns whether or not any error causes the sequence to stop.
- Returns:
True if the error is
ErrorAction.AbortSequence
orErrorAction.StopSequence
, false if the error isErrorAction.ContinueSequenceExecution
.- Return type:
bool
- property should_raise
Determines whether or not this error raises an exception.
- Returns:
False if the error is
ErrorAction.ContinueSequenceExecution
with an error code of 0. Otherwise, this function returns True.- Return type:
bool
- class niveristand.errors.RunError(error)
Bases:
VeristandError
Raised at the end of execution if an RT sequence called
generate_error
.- get_all_errors()
Generates a list of all errors reported during execution.
- Returns:
all errors generated during execution.
- Return type:
List(
SequenceError
)
- class niveristand.errors.RunFailedError(error)
Bases:
RunError
Raised by
run_py_as_rtseq
to report that the sequence failed.This error is raised when a real-time sequence executes successfully, but
generate_error
was called withErrorAction.ContinueSequenceExecution
.
- class niveristand.errors.RunAbortedError(error)
Bases:
RunError
Raised by
run_py_as_rtseq
to report that the sequence failed.This error is raised when a real-time sequence executes successfully, but
generate_error
was called withErrorAction.StopSequence
orErrorAction.AbortSequence
.