Default action to be taken when an error is encountered.

Property of

_app object

Description

Use the errorAction property to handle errors, and error reporting, when a TRY. . . CATCH or ON ERROR handler is not in affect. If the error occurs within a try...catch, or if an on error handler is active, the TRY...CATCH or ON ERROR handlers will retain control.

errorAction is an enumerated property with the following values:

 

Value

Description

0

Quit

1

Send HTML Error & Quit

2

Log Error & Quit

3

Send HTML Error, Log Error & Quit

4

Show Error Dialog (Default)

5

Log Error & Show Error Dialog

 

Option 0

dBASE Plus will shutdown cleanly without reporting the error.

Options 1 and 3

dBASE Plus will to use the file specified in errorHtmFile as a template to format error information sent out as an HTML page. These options are only appropriate when running a dBASE Plus Web application that was invoked via a web server such as Apache or IIS (Internet Information Server).

The default value for errorHtmFile is error.htm.

If error.htm cannot be found, or an error occurs when trying to open or read it into memory, dBASE Plus will use a built-in default HTML template that matches the default US English error.htm.

Options 2, 3, and 5

dBASE Plus will log the error to disk using the file specified in errorLogFile. If the error log file cannot be opened, for instance when another application has it opened exclusively, dBASE Plus will try up to 15 times to open the file and write the log entry. dBASE Plus will wait approximately 300 milliseconds between retries. Should all 15 attempts fail, dBASE Plus will proceed without logging the error.

Option 4

This is the default option which displays an error dialog offering the option to Fix, Ignore, or Cancel the error.

Option 5

dBASE Plus will log the error and display an error dialog. The error dialog offers the option to Fix, Ignore, or Cancel the error.