Complete the following steps to define custom error codes using the Error Code Editor dialog box. After you create your custom error code file, you can select the errors in the Select Error dialog box and you can distribute the file in an application or shared library.
You also can define custom error codes in the same range by creating an XML-based text file. You must name the text file xxx-errors.txt, where xxx is a name that you supply. The xxx-errors.txt file must use the following syntax exactly, including capitalization, spacing, and so on. You supply the italic text.
Note You must manually create an errors folder in the LabVIEW\user.lib directory to organize your error code files. |
<?xml version="1.0" encoding="Windows-1252"?>
<nidocument>
<nicomment>
This file describes custom errors for my VI.
<nifamily familyname="Your Custom Errors" displayname="Your Custom Errors">
</nifamily>
</nicomment>
<nierror code="5000">
Memory full.
Add more memory.
</nierror>
<nierror code="5001">
Invalid name. Enter a new name.
</nierror>
</nidocument>
You can add your own comment between the <nicomment></nicomment> tags. In each <nierror> tag, you must define the error code number. Define the error code message between the <nierror></nierror> tags. The <nifamily></nifamily> tag is optional. The text between these tags appears as the error category if you use the Select Error dialog box.
Changes to error code text files take effect the next time you start LabVIEW.