Root > Reference > All Types > TELEvExceptionErrorProc

Type TELEvExceptionErrorProc

Previous pageReturn to chapter overviewNext page   

Procedural event handler for OnExceptionError event.

 

Unit

EEvents

 

Syntax

 

Code (Delphi)

TELEvExceptionErrorProc = procedure(

const ACustom: Pointer;

AExceptionInfo: TEurekaExceptionInfo;

const AEurekaAction: TEurekaActionType;

const AAdditionalInfo: String;

var ARetry: Boolean;

var ACallNextHandler: Boolean

);

 

Parameters

ACustom [in, optional]

Custom user data parameter. It's the same pointer as it was passed to RegisterEvent-function.

 

AExceptionInfo [in, optional]

Information about exception. Can be nil.

 

AEurekaAction [in]

Failed action.

 

AAdditionalInfo [in]

Reason why action has failed.

 

ARetry [out]

True - repeat failed action, False - (default) fail operation.

 

ACallNextHandler [out]

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

Tip

Set to False, if you set ARetry to True.

 

 

Remarks

OnExceptionError event is fired for any failed operation during exception processing: saving to bug report, sending via Internet, etc. You can use this event to correct settings and retry the operation or to use a fallback fail code, etc.

 

AExceptionInfo represents original exception which is being processed. It may be nil.

 

AAdditionalInfo represents secondary error which failed AEurekaAction step.

 

Tip

Be sure to do something before switching ARetry to True. Repeating failed action without any attempt to correct settings / environment will simply fail again.

 

Warning

Be careful when setting ARetry to True: the failed action will be repeated and may raise the same error again. Ensure you have some sort of check to avoid infinite loop.

 

Caution!

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.

 

Warning

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).

 

See also




Send feedback... Build date: 2023-09-11
Last edited: 2023-09-11
PRIVACY STATEMENT
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: https://www.eurekalog.com/help/eurekalog/topic_type_eevents_televexceptionerrorproc.php