Root > Reference > All Functions > Fmt

Function Fmt

Previous pageReturn to chapter overviewNext page   

Specifies a custom handler of EurekaLog internal errors.

 

Unit

EBase

 

Syntax

 

Code (Delphi)

function Fmt(

const Format: String;

const Args: array of const

): String; overload;

 

Value

Contains internal error handler/dispatcher. Can be nil. By default it's assigned to minimal code, which shows simple message box (via custom MessageBox procedure) with basic internal error info.

 

Remarks

Do not call it. Call InternalErrorSet procedure instead.

 

You can assign this variable to your own custom handler to be able react to internal error messages.

 

Please note that you're responsible for terminating application in the end of your handler. If you fail to do so - application will be terminated anyway, by InternalErrorSet wrapper.

 

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.

 

Examples

Example of trivial internal error handler:

Code (Delphi)

procedure CustomInternalHandler(const AStage, AMsg: String; const ALastError: Cardinal);

begin

MessageBox(AMsg, AStage, MB_OK or MB_ICONSTOP);

InternalErrorRestart(Cardinal(E_FAIL));

end;

var

SavedHandler: TInternalErrorProc;

initialization

SavedHandler := _InternalError;

_InternalError := CustomInternalHandler;

finalization

_InternalError := SavedHandler;

 

 

See also

InternalErrorSet
TInternalErrorProc
InternalErrorRestart



Send feedback... Build date: 2026-03-07
Last edited: 2026-03-07
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_function_ebase_fmt.php