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 of 1000-1999. See LSERR.LSS for a list of LotusScript errors.

Example
See Also