Creating User-Defined Error Codes with the General Error Handler
Downloads
Filename: user_defined_error_codes.vi
Requirements: View
LabVIEW Version: 6.1
Note: To use this VI in previous versions of LabVIEW, use the File>>Save with options... feature and select Save for previous.
VIs USED:
General Error Handler VI, Bundle by Name.
METHOD:
The General Error Handler VI accepts two user-defined arrays, the User-Defined Error Codes and the User-Defined Error Descriptions. The index of the error code from the first array must match the index of the code's description in the second array.
In this VI, index 0 in the User-Defined Error Codes array contains error code number 5000. The description for error code 5000 appears in index 0 of the User-Defined Error Descriptions array.
These two components build the first and second lines of the error dialog. "Error xxxx ocurred at location yyyy, Possible Reasons: "User-Defined Description".
The components of the error cluster include code, status, and source. When status is TRUE, the VI searches for a match in the internal error code database and in the user defined array. If the VI locates a match for the error code, it also searches for the same index in the description array. The range for User-Defined Error Codes is 5000 to 9999.
Refer to the LabVIEW Help for more information on creating User-Defined Error Codes.
Requirements
Filename: user_defined_error_codes.vi
Software Requirements
Application Software: LabVIEW Base Development System 6.1
Language(s): LabVIEW
Reader Comments | Submit a comment »
Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
