FireDAC.Phys.TFDPhysDriverService.OnError
Delphi
property OnError: TFDErrorEvent read FOnError write FOnError;
C++
__property Firedac::Stan::Error::TFDErrorEvent OnError = {read=FOnError, write=FOnError};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
event | published | FireDAC.Phys.pas FireDAC.Phys.hpp |
FireDAC.Phys | TFDPhysDriverService |
Description
Occurs when an exception is raised by a service.
The event handler of OnError receives the following parameters:
ASender
is the driver service.AInitiator
is the object that raises the exception.AException
is the exception. It is usually an instance of EFDDBEngineException.
You can handle OnError to perform actions when a service execution raises an exception. This event allows centralized service errors handling. For example, the handler may log the exceptions into a log file. You can even create a new exception object and assign it to AException
; if you do so, you must free the original exception object.