GetLastEurekaLogErrorMsg function

Top  Previous  Next

EurekaLog includes a function named GetLastEurekaLogErrorMsg, that enables you to obtain the last internal EurekaLog error message.

 

Syntax of this function is as follows:

 

function GetLastEurekaLogErrorMsg: string;

 

You should use this function in the EurekaLog ExceptionActionNotify event to check if for errors in the email sending procedure (or other).

 

 

Example:

 

 

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

 

procedure MyActionNotify(EurekaExceptionRecord: TEurekaExceptionRecord;

                          EurekaAction: TEurekaActionType; var Execute: Boolean);

begin

   if (EurekaAction = atSentEmail) and 

      (GetLastEurekaLogErrorCode in [eeEmailMAPIError, eeEmailShellError, eeEmailSMTPError]) then

     begin

       MessageBox(0,PChar(GetLastEurekaLogErrorMsg), 'Email error', MB_OK or MB_ICONERROR);

     end;

end;