[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Forms' (#lcl)

TApplication.CaptureExceptions

Enables exception handling in the Application.

Declaration

Source position: forms.pp line 1720

public property TApplication.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

TApplication.HandleMessage

  

Handles pending messages, and enters the Idle state.

TApplication.HandleException

  

HandleException method for handling an exception; attempts to maintain program execution if possible, otherwise exits gracefully.

TApplication.Create

  

Constructor for the class instance.

TApplication.Destroy

  

Destructor for the class instance.

ExceptProc


Version 3.2 Generated 2024-02-25 Home