ERROR Command
| Visual FoxPro 9.0 SP2 |
| ERROR Command |
| See Also |
|
Generates a Visual FoxPro error.
You can use the ERROR command to test error handling routines or to display custom error messages.
ERROR nErrorNumber | nErrorNumber, cMessageText1 | [cMessageText2] |
Parameters
- nErrorNumber
-
Specifies the number of the error to generate. The standard Visual FoxPro error message is used when an error number is specified.
For a list of Visual FoxPro error messages and their error numbers, see Error Messages Listed Alphabetically.
- cMessageText1
-
Specifies the text displayed in an error message that supplies additional information about the error. For example, if you reference a memory variable that does not exist, Visual FoxPro supplies the name of the memory variable in the error message.
- cMessageText2
-
Specifies the text displayed in the error message. When cMessageText2 is specified instead of nErrorNumber, Visual FoxPro error number 1098 (user-defined error) is generated. To move a portion of the error message to the next line, use a carriage return (CHR(13)) in cMessageText2.
Remarks
Examples
See Also
© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic
Note
Microsoft Visual FoxPro 9 SP2 Help file, VFPX Edition v1.08