[User Error Editor] (Tools Menu)
: Ctrl+U
The User Error Editor allows you to define user errors.
Navigating the grid
Press the [Tab] key to move to the next cell. Press the [Shift] + [Tab] key to move to the previous cell. Press the arrow [↑] or [↓] key to move to the cell above or below.
TIP
Enter the error number to move the cursor to the corresponding row.
Item | Description |
---|---|
Show defined only | Only shows registered user errors. |
Searches for labels, and moves the cursor to the row of the label found. | |
Error | The user error number. User error numbers can be from 8000 to 8999. |
Label | Sets the label. Labels can be up to 32 characters in length, containing both half-width alphanumeric characters and underscores. |
Message | Enter the message that appears when an error occurs. |
TIP
It is recommended that you use the ER prefix for each error label and use all caps for the label. This makes it easy to see error labels in your code.
For example:
Error Number # | Label | Message |
---|---|---|
8000 | ER_VACUUM | Vacuum error has occurred. |
8001 | ER_INDEXOT | Indexer overtime has occurred. |
In your program code, use the Error statement to generate a user error.
For example:
Function main
On Vacuum
Wait Sw(VacOn), 1
If TW = 1 Then
Error ER_VACUUM
EndIf
Fend
The user error information is stored in the current project directory in a file called UserErrors.dat.
You can use [Import File] from the [File] menu to import user errors from other projects.
After adding new error definitions, save the changes by executing Save from the [File] menu or by clicking on the [Save all files] on the toolbar.
Split screen
Drag the split bar at the top of the grid down to split each grid into two scroll regions.