Sign in Join
FPDoc Onlineexperiment

TApplication.CaptureExceptions property

Member of TApplicationpublicIn unit Forms

Enables exception handling in the Application.

Declaration

pascal
property CaptureExceptions: Boolean read FCaptureExceptions write SetCaptureExceptions;

Description

CaptureExceptions is a Boolean property which enables or disables exception handling for errors which occur when messages are handled in the application. The default value for CaptureExceptions is set to True in the Create constructor. CaptureExceptions is set to False in the Destroy destructor.

Changing the value for the property causes the routine in the RTL ExceptProc constant to be updated. When set to True, the constant is set to the ExceptionOccurred routine in the implementation section for the forms.pp unit. When set to False, the previous exception handler routine is restored.

CaptureExceptions is used in the message processing loop for the TApplication instance. When enabled, the HandleMessage method is called in a TRY..EXCEPT block, and HandleException is called if an exception is raised. When disabled, HandleMessage is called without the benefit of exception handling.

See also

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.