Specifies custom handler of errors inside SafeExec function.
Unit
Syntax
|
Value
Contains error handler/dispatcher. Can be nil. If not assigned - any error inside SafeExec will trigger internal EurekaLog error (via ShowInternalErrorMessage procedure).
Remarks
Basically, this is an error handler for errors inside initialization/finalization section (only applicable to EurekaLog's code; user's code doesn't call SafeExec). It's executed on exception inside SafeExec procedure.
Handler should process the error (usually by generating an bug report) and return control.
Do not call this routine directly.
Warning |
If you change this variable to your own handler at any stage - do not forget to restore previous handler at opposite stage. I.e. you need to save and restore handler. See examples. |
By default it's nil, which means faulting with internal EurekaLog error.
Other units (like ECore, EDebugInfo and EExceptionManager) installs their own handlers, which improve detalization of an error message on each step.
For example, handler from ECore adds information about exception.
Handler from EDebugInfo adds human-readable call stack.
Handler from EExceptionManager provides complete information about exception.
Examples
Example of trivial error handler:
procedure CustomInternalHandler(const AProc: ETypes.TProcedure; const ASection: String);
begin
MessageBox('An error at ' + ASection, 'Error', MB_OK or MB_ICONSTOP);
end;
var
SavedHandler: TInitDoneErrorHandleProc;
initialization
SavedHandler := _InitDoneErrorHandler;
_InitDoneErrorHandler := CustomInternalHandler;
finalization
_InitDoneErrorHandler := SavedHandler;
See also
| Send feedback... |
Build date: 2015-09-24 Last edited: 2015-09-24 |
|
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: http://www.eurekalog.com/help/eurekalog/topic_var_elowlevel__initdoneerrorhandler.php |
|