Right-click the [user-defined codes] input and select Create»Constant from the shortcut menu. An array appears.
Double-click the numeric constant and enter a number within the range of -8999 to -8000, 5000 to 9999, or 500,000 to 599,999 in the array. For example, enter 5008.
Right-click the [user-defined descriptions] input and select Create»Constant from the shortcut menu. Another array appears.
Double-click the string constant and enter a description in the user-defined description array. For example, enter Ignore this message.
Right-click the error in input and select Create»Constant from the shortcut menu. A cluster appears that contains a Boolean constant, a numeric constant, and an array.
Use the Operating tool to set the Boolean control to TRUE.
Double-click the numeric constant and enter the same number that appears in the [user-defined codes] constant.
Note As an alternative to steps 6 through 8, you can wire a numeric constant with the specified error code to the Error Cluster From Error Code VI. Then wire the error out output of the Error Cluster From Error Code VI to the error in input of the General Error Handler VI.
Run the VI. An error dialog appears and displays the customized error code and description. Click the Continue button in this error dialog.
Double-click the General Error Handler subVI and view the front panel. Switch to the VI in which you defined your custom error code, and run the VI again. Click the Continue button again and notice that the message text box on the front panel of the General Error Handler VI displays the same customized error code and description as the error dialog.
You also can define custom error codes by creating an XML-based text file and adding the error codes and messages to the text file.