Root > Reference > Events > TELEvExceptionNotifyMeth

Type TELEvExceptionNotifyMeth

Previous pageReturn to chapter overviewNext page   

Method event handler for OnExceptionNotify event.







Code (Delphi)

TELEvExceptionNotifyMeth = procedure(

AExceptionInfo: TEurekaExceptionInfo;

var AHandle: Boolean;

var ACallNextHandler: Boolean

) of object;



AExceptionInfo [in]

Information about exception.


AHandle [out]

True - (default) process exception with EurekaLog, False - process exception with standard exception handler


ACallNextHandler [out]

True (default) - call next registered event handler, False - do not call next event handler.



Set ACallNextToHandler to False, if you set AHandle to False.




By default: OnExceptionNotify event is fired for any exception which wasn't handled by the code.



If "Catch handled exception" option is enabled - this event will also fire for any handled exception.


You can determinate the kind of exception (handled or unhandled) by analyzing properties of AExceptionInfo argument (see Handled property).


You can use this event to disable processing of certain exceptions by EurekaLog.



You can also use exception filters instead of this event.


Use OnExceptionAction event to fine-control processing of exceptions.



Any event is called from the context of exception thread, which may be not the main thread of application. Thus, it's highly recommended to avoid using any global-like data and to avoid access VCL objects. If you still need to do any of that - please use proper thread synchronization for globals and Synchronize method for VCL access.



Event handlers registered via TEurekaLogEvents component will be active only when corresponding form is live (created). Such handlers will not be called before form is created or after it was destroyed. For this reason you may want to register your event handlers via code. For example, it would be a bad idea to use TEurekaLogEvents component for implementing your error dialog, because your dialog will not be displayed for exceptions outside form (e.g. initialization/finalization exceptions, as well as exceptions in form's constructor).




Code (Delphi)


raise Exception.Create('Error'); // - OnRaise event




// - OnExceptionNotify will be called


Code (Delphi)


raise Exception.Create('Error'); // - OnRaise event




// - OnExceptionNotify will not be called, since exception was handled by the code


See this article for example of registering event handlers.


Sample event handler may look like this:


Code (Delphi)

procedure MyExceptionNotify(const ACustom: Pointer; AExceptionInfo: TEurekaExceptionInfo; var AHandle: Boolean; var ACallNextHandler: Boolean);


 // Disable exception processing by EurekaLog

 Handle := False;

 ACallNextHandler := False;



See also

Send feedback... Build date: 2022-03-28
Last edited: 2022-03-28
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.

Permanent link to this article: