Use the error in and error out clusters in each VI you use or build to pass the error information through the VI. In most cases, source also identifies where the error occurred. If error in detects an error, the VI returns the error information in error out and does not continue to run. By default, LabVIEW automatically handles any error when a VI runs by suspending execution, highlighting the subVI or function where the error occurred, and displaying an error dialog box. You can disable automatic error handling.
Refer to the ranges of error codes for a list of errors that LabVIEW reports for each platform. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. You also can use the General Error Handler VI to define custom error codes and messages.
Complete the following steps to see an example of how to use the error clusters in a VI.
If an error occurs, the Case structure executes before reaching this VI. The VI does not execute the main code but instead passes the error information straight through the Case structure to the error out cluster. If no error occurs, the VI creates a new report.