Errors¶
-
class
niveristand.errors.VeristandError¶ The base class for all VeriStandErrors.
Note: This class generates a
VeristandErrorif a more specific error cannot be determined.
-
class
niveristand.errors.TranslateError¶ Bases:
niveristand.errors.VeristandErrorRaised 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_errorto report a sequence failure.-
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: SequenceErrorReal-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.
-
is_fatal¶ Returns whether or not any error causes the sequence to stop.
Returns: True if the error is ErrorAction.AbortSequenceorErrorAction.StopSequence, false if the error isErrorAction.ContinueSequenceExecution.Return type: bool
-
should_raise¶ Determines whether or not this error raises an exception.
Returns: False if the error is ErrorAction.ContinueSequenceExecutionwith an error code of 0. Otherwise, this function returns True.Return type: bool
-
-
class
niveristand.errors.RunError(error)¶ Bases:
niveristand.errors.VeristandErrorRaised 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:
niveristand.errors.RunErrorRaised by
run_py_as_rtseqto report that the sequence failed.This error is raised when a real-time sequence executes successfully, but
generate_errorwas called withErrorAction.ContinueSequenceExecution.
-
class
niveristand.errors.RunAbortedError(error)¶ Bases:
niveristand.errors.RunErrorRaised by
run_py_as_rtseqto report that the sequence failed.This error is raised when a real-time sequence executes successfully, but
generate_errorwas called withErrorAction.StopSequenceorErrorAction.AbortSequence.