Simple Error Handler VI

Owning Palette: Dialog & User Interface VIs and Functions

Requires: Base Development System

Indicates whether an error occurred. If an error occurred, this VI returns a description of the error and optionally displays a dialog box.

This VI calls the General Error Handler VI and has the same basic functionality as General Error Handler but with fewer options.

 Add to the block diagram  Find on the palette
error code is a numeric error code. If error in indicates an error, the VI ignores error code. If not, the VI tests it. A nonzero value signifies an error.
error source is an optional string you can use to describe the source of error code.
type of dialog determines what type of dialog box to display, if any. Regardless of its value, the VI outputs the error information and message describing the error.

0no dialog—Displays no dialog box. This is useful if you want to have programmatic control over handling errors.
1OK message (default)—Displays a dialog box with a single Continue button. After the user acknowledges the dialog box, the VI returns control to the main VI.
2continue or stop message—Displays a dialog box with buttons, which the user can use to either continue or stop. If the user selects Stop, the VI calls the Stop function to halt execution.
3OK message + warnings—Displays a dialog box with any warnings and a single Continue button. After the user acknowledges the dialog box, the VI returns control to the main VI.
4continue/stop + warnings—Displays a dialog box with any warnings and buttons, which the user can use to either continue or stop. If the user selects Stop, the VI calls the Stop function to halt execution.
error in describes error conditions that occur before this node runs.

This input contains status, code, and source, which provide standard error in cluster element functionality.
error? returns TRUE if an error occurs. If this VI finds an error, it sets the parameters in the error cluster.
code out is the error code indicated by error in or error code.
source out indicates the source of the error. The source out string is a more descriptive string than the source string in the error in input.
error out contains error information. This output provides standard error out functionality.
message describes the error code that occurred, the source of the error, and a description of the error. If the VI does not return a description of the error, you can take several actions to find the error code description. If more than one description exists for the same error code, the VI displays all the descriptions, separated by or.