LOTUSSCRIPT LANGUAGE


Error statement
Example

Signals an error number and its corresponding message.

Syntax

Error errNumber [ , msgExpr ]

Elements

errNumber


msgExpr
Usage

If errNumber is a LotusScript-defined error number, this Error statement simulates a LotusScript error. If it is not, this statement creates a user-defined error. When the Error statement is executed, LotusScript behaves as if a run-time error has occurred. If no error handling is in effect (set up by an On Error statement) for the specified error, execution ends and an error message is generated.

The error message generated is msgExpr if it is specified. If msgExpr is omitted, the error message is the LotusScript error message for the specified error number, if that number designates a LotusScript error. Otherwise the message "User-defined error" is generated.

User-defined errors must be in the range 1000-1999. Errors less than 1000 are reserved for the LotusScript language; the constant ErrLast is the highest error number implemented. Errors greater than 1999 are reserved for Lotus products that use LotusScript.

See LSERR.LSS for a list of LotusScript errors.

Example
See Also