Error

See Also: Generic Errors, Err global indicator, ErrLine gobal indicator, Error Handling in Transactions, Explanation of user (handled) errors and unhandled errors, AddUserError, CallStackDump

Purpose

To signal an error has occurred.

Syntax

Error {error-num} [{message}]

Where {error-num} is the error number to report; {message} may not be longer than 1000 characters.

What It Does

The Error command signals that an error has occurred. The predefined variable, Errline, is set to the line number that the error occurs. The predefined variable LastErr is set to the error number, {error-num}. Subsequent calls to the Boolean expression Err will return TRUE.

If {error-num} matches the number of an error in any of the DataFlex error database file, the message from the table for that error will be displayed. Use the Error Codes Maintenance tool (on the DataFlex Studio's Tools menu) to maintain the error database tables.

Example

Error DFErr_Program "This is just a test."

Notes