APGen Documentation Previous Topic: Error Handling Next Topic: Script Language Error Handling Parent Topic: Error Handling    Error Handling
Default Error Handler
See Also:

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:

  1. 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. 
  2. The error is logged (to the Log object) according to the current Log.Flags settings.
  3. 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.