Default Error Handler
The default error handler is the standard APGen error handler -
it is run if no custom error handlers pre-empt it. Custom error
handlers
(Script.OnError handlers
and Script Error Event handlers),
if present, can set the oAPGError.Handled property to True to prevent
the default error handler from running.
The default error handler performs the following
actions:
- If Script.Debug is true, and the error is
fatal, a dialog box pops up notifying the user of the error. If the
error is a syntax or compile error, the user is notified that the script
will not be executed. If the error is a run-time error, and a script
debugger is installed, the user is given the option to debug the script.
If the error is a run-time error, and a script debugger is not installed, the
user is notified that script execution cannot continue.
If Script.Debug is false, the user is not notified that an error occurred.
- The error is logged (to the Log object) according to the current Log.Flags settings.
- If the error is fatal, execution of the script is halted and an error is returned from Run() or RunArgs().
The value of Script.Debug does not affect error logging. The value of Script.Debug
determines whether or not errors cause interaction with the user.