[Overview][Types][Classes][Variables][Index] |
Handle an exception.
Source position: custapp.pp line 63
public procedure TCustomApplication.HandleException( |
Sender: TObject |
); virtual; |
Sender |
|
Sender class calling this routine |
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.
|
Show an exception to the user |
|
|
Should the program loop stop on an exception |
|
|
Was Terminate called or not |
|
|
Runs the application. |