$SUPPRESS_UNCAUGHT_EXCEPTION_DIALOG

If an uncaught exception occurs, suppress the dialog that displays the $procerrorcontext information about the cause of the exception.

$SUPPRESS_UNCAUGHT_EXCEPTION_DIALOG {= } 0 | 1

Defaults

Assignment file: application assignment file
Section: [SETTINGS]
Default value: None

Description

Important: Use this setting only in situations where a Windows or character mode application is run as part of an automated process (such as automated testing). To suppress uncaught exceptions in a production application, enclose the apstart command within a try-catch block in the application apstart trigger.

By default, if an uncaught exception occurs, a form is displayed containing the information provided by $procerrorcontext about the error that caused the exception. This is intended behavior during application development to ensure that the developer sees the exception and can fix the problem that caused it.

However, this behavior can cause an automated test to hang while it displays the form. To prevent the form from being displayed and ensure that the exception information is not lost:

  1. Set $SUPPRESS_UNCAUGHT_EXCEPTION_DIALOG=1.
  2. Specify a message log file using $PUTMESS_LOGFILE or a transcript log file using $TRANSCRIPT_LOGFILE.

The uncaught exception information is written to the log file specified by $PUTMESS_LOGFILE. If this is not specified, it is written to the console (on Windows, this is the Transcript window). If neither $PUTMESS_LOGFILE nor $TRANSCRIPT_LOGFILE are specified, the information about the uncaught exception will still be written to the console on Unix, but will be lost on Windows.

Related Topics