How to use this event

Top  Previous  Next

EurekaLog includes an "AttachedFilesRequest" event for interaction with the user program when a raised exception is handled by EurekaLog and the user want send custom files with the EurekaLog message (via Email and Web).

 

The syntax of this event is:

 

procedure MyAttachedFiles(EurekaExceptionRecord: TEurekaExceptionRecord; AttachedFiles: TStrings);

 

To use this event you must create a routine with the indicated parameters and assign it to the AttachedFilesRequest EurekaLog variable, as shown in the following example:

 

uses ExceptionLog, ECore, ETypes; // The required units...

 

// This is a normal procedure (not a method)...

procedure MyAttachedFiles(EurekaExceptionRecord: TEurekaExceptionRecord; AttachedFiles: TStrings);

begin

   ...

   ...  // Your code...

   ...

end;

 

begin

   // Assign AttachedFilesRequest variable to MyAttachedFiles procedure...

   AttachedFilesRequest := MyAttachedFiles; 

end.

 

 

Note: to simplify management of your EurekaLog events, you can use the TEurekaLog.OnAttachedFilesRequest event.