Root > How to... > ...write code with EurekaLog?

...write code with EurekaLog?

Previous pageReturn to chapter overviewNext page   

We recommend to wrap all EurekaLog-specific code into {$IFDEF EUREKALOG} defines, like so:


  EBase, EEvents, ETypes,

// EurekaLog-specific code
procedure MyExceptionNotifyHandler(const ACustom: Pointer; 
  AExceptionInfo: TEurekaExceptionInfo; 
  var AHandle: Boolean; 
  var ACallNextHandler: Boolean);
  // your code here
  RegisterEventExceptionNotify(nil, MyExceptionNotifyHandler);


That way your project may be compiled with or without EurekaLog.


The only exception from this rule is the EBase unit and all its routines and types - such as BeginThreadEx, TThread, NameThread, IsEurekaLogActive, SetExceptionMessage, etc. The EBase unit is specifically designed in such a way that it can be used with and without EurekaLog.


For specific code examples, please see:



See also:

Send feedback... Build date: 2022-03-28
Last edited: 2022-02-22
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: