Skip to content

AddUserError - cBaseErrorHandler

Adds an error number to the error handler's list of user (handled) errors

Type: Procedure

Parameters

Parameter Type Description
iError Integer The error number to add

Syntax

Procedure AddUserError Integer iError

Call Example

Send AddUserError iError

Description

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.

Sample

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.