TCustomApplication.HandleException procedure
Handle an exception.
Declaration
procedure HandleException(Sender: TObject); virtualArguments
Sender | Sender class calling this routine. |
Description
HandleException is called (or can be called) to
handle the exception
Sender. If the exception is not of class
Exception then the default handling of exceptions in the
SysUtils unit is called.
If the exception is of class Exception and the OnException handler
is set, the handler is called with the exception object and
Sender argument.
If the OnException handler is not set, then the exception is
passed to the ShowException
routine, which can be overridden by descendent application classes to
show the exception in a way that is fit for the particular class of
application. (a GUI application might show the exception in a message
dialog.
When the exception is handled in the above manner, and the StopOnException property is
set to True, the Terminated
property is set to True, which will cause the Run loop to stop, and the application
will exit.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
