See Also: Err, Error Command, Error_Report Command
To identify the object to be used for handling of error reports.
Integer
WebAppError.pkg should be used for Web applications and DfError.pkg for Windows / FlexTron applications. When those packages are used, an object, oErrorHandler, of the respective cWebErrorHandler or cWindowsErrorHandler class, is created.
When the cWindowsErrorHandler or cWebErrorHandler class is instanciated, the value of its object_id is moved to predefined variable error_object_id as well as to the global variable ghoErrorHandler. When the value of error_object_id is greater than 0, as it is after the oErrorHandler object creation, error events not diverted or deferred send a message to the error object.
ghoErrorHandler is the central error handling object instance (both on Windows and Web). Error_Object_Id is the active error object, which is usually the same as ghoErrorHandler, but can also be a different object (business processes can change the Error_Object_Id, for example).
Whether Windows or Web, you should use the global variable ghoErrorHandler to reference the application's error handler. Do not use Error_Object_ID.
Error objects can also be activated from error handling routines executed through an Error command for those errors for which such handling is desired.
At such points in the program as you may wish to defeat error handling by the error object, you may move 0 or -1 to Error_Object_ID, and move its original value back to it when you wish to restore the handling.
"Fatal" errors, if not trapped by the error object, will abort the running program.
Error 10 (Out of memory) cannot be trapped or deferred. It is always reported immediately.