Error codes 5000 through 9999 and -8999 through -8000 are reserved for you to define custom error messages.
Complete the following steps to define custom error codes.
- Place the General Error Handler VI on the block diagram.
- 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 5000 to 9999 or -8999 to -8000 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.
- Run the General Error Handler VI. The message box on the General Error Handler VI front panel displays the customized error code and description.
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.