Parameter | Description |
---|---|
iError | The error number to add |
Procedure AddUserError Integer iError
Call: | Send AddUserError iError |
The error system categorizes errors as a user error (handled) or a program error (unhandled). If an error is part of the user error list, it will be treated as a user error. The AddUserError message adds an error number to the list of user errors.
Send AddUserError of Error_Object_Id 300
Note that there is a simpler way to setting a custom error message. Just set the Field_Error to 0 and set the error text. For example:
Set Field_Error Field Department.Budget to 0 "Incorrect budget"
The most common user errors have already been added to the error object.
RemoveUserError and RemoveAllUserErrors can be used to remove error numbers from the user error list.