Error - Error object
The error object is used to store and pass error information to the application. Errors are identified by error class and error number. In addition the class and function name detecting the problem and a short error explanation can be provided. Moreover, an error may include up to 6 context depending error variables that can be displayed in the error message.
Usually error messages are written to a log file (error.lst) which is stored in a folder addressed by the TRACE environment or ini-file variable. It is, however, also possible to display errors on the terminal.
Usually errors should be reset in all functions that may signal an error. Otherwise the calling function may not be able to determine whether the error signaled is an old error or has just been signaled in the called function. This strategy requires, on the other hand, that signaled errors have to be saved when other functions are called in the error handling that might generate errors again, since those functions will reset the error. You can use the Copy() function to save the error.
The way errors are presented in the application depends on the error handler installed (ErrorHandle). Usually errors are written to the console output for console applications and shown in a message box for windows applications.