Sign in Join
FPDoc Onlineexperiment

TApplication.ShowException procedure

Member of TApplicationpublicIn unit Forms

Shows the message for the specified exception and asks the user to abort or continue.

Declaration

pascal
procedure ShowException(E: Exception); override

Arguments

E

The exception with the message to display in the method.

Description

E is the Exception instance with the message displayed in the method. If the message contains an invalid UTF-8 codepoint, AnsiToUtf8 is called to get a valid UTF-8 value for the exception message.

ShowException creates a dialog to display the exception message. If the exception occurred before the application was fully initialized, the inherited ShowException method is called.

The value in the ExceptionDialog property determines the type of dialog displayed for the message, and the buttons available on the dialog. While the dialog is active, the OnIdle event handlers in the application are disabled. They are re-enabled when the dialog is closed. The modal result from the dialog determines whether the application is terminated by calling Halt, or allowed to continue.

No actions are performed in the method when AppNoExceptionMessages has been included in the Flags for the application. The exception message is not displayed and control is returned to the calling routine.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.