Catch Exception¶
Determine whether a Python function call resulted in an exception.
All Python exceptions use LabVIEW error code 403427 - Python exception. However, it is sometimes useful to check for specific Python exceptions by name.
Use this VI after Call to detect a particular Python exception, identified by Exception Class Name. The output Found will be True if an Python exception with a matching name is present. A brief description of the exception is available at the Message terminal, and the complete Python stack traceback at Traceback.
If the specified exception is found, the LabVIEW error_out terminal will have "no error".
Session ID/Session ID Out- The current Python session ID. Session ID Out always contains the same value as Session ID.
Exception Class Name- Name of the exception to check for, for example ValueError.
Found?- Whether the exception was present.
Message- Brief description of the error.
Traceback- String representation of the Python traceback
Error In/Out- Terminals for standard error functionality.
Common error codes¶
This VI doesn't produce any errors of its own.