Root > Compatibility > 5.x -> 6.x > EurekaLog 6 Documentation > TEurekaLog component > Examples

Examples

Previous pageReturn to chapter overviewNext page   

Caution: this is old EurekaLog 6 documentation. This is not the latest version.

 

Some examples:

 

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

 

// OnExceptionNotify example...

procedure TForm1.EurekaLog1ExceptionNotify(

  EurekaExceptionRecord: TEurekaExceptionRecord; var Handled: Boolean);

begin

  // Don't save the Log File...

  EurekaExceptionRecord.CurrentModuleOptions.SaveLogFile := False;

end;

 

See the "ExceptionNotify-Examples" topic for further details.

 

 

 

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

 

// OnHandledExceptionNotify example...

procedure TForm1.EurekaLog1HandledExceptionNotify(

  EurekaExceptionRecord: TEurekaExceptionRecord; var Handled: Boolean);

begin

  // Don't save the Log File...

  EurekaExceptionRecord.CurrentModuleOptions.SaveLogFile := False;

end;

 

See the "ExceptionNotify-Examples" topic for further details.

 

 

 

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

 

// OnExceptionActionNotify example...

procedure TForm1.EurekaLog1ExceptionActionNotify(

  EurekaExceptionRecord: TEurekaExceptionRecord;

  EurekaAction: TEurekaActionType; var Execute: Boolean);

begin

   // Show exception dialog?

   if EurekaAction = atShowingExceptionInfo then

     begin

       Execute := MessageBox(0,'Do you want to show error details?''Question',

                    MB_YESNO or MB_ICONQUESTION or MB_TASKMODAL)<>ID_YES;

    end;

end;

 

See the "ExceptionActionNotify-Examples" topic for further details.

 

 

 

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

 

// OnExceptionErrorNotify example...

procedure TForm1.EurekaLog1ErrorNotify(

  EurekaExceptionRecord: TEurekaExceptionRecord;

  EurekaAction: TEurekaActionType; var Retry: Boolean);

begin

  // An error occurred when sending the email...

  if EurekaAction = atSentEmail then

    begin

      // Try to send the email via SMTP client.

      EurekaExceptionRecord.CurrentModuleOptions.SMTPHost := 'localhost';

      Retry := True; // Force retry of this action.

    end;

end;

 

See the "ExceptionErrorNotify-Examples" topic for further details.

 

 

 

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

 

// OnAttachedFilesRequest example...

procedure TForm1.EurekaLog1AttachedFilesRequest(

  EurekaExceptionRecord: TEurekaExceptionRecord;

 AttachedFiles: TStrings);

var

  Path: string;

begin

  // Attach a file chose by user...

   Path := InputBox('Request''Insert the path of the file to send''');

   AttachedFiles.Add(Path);

end;

 

See the "AttachedFilesRequest-Examples" topic for further details.

 

 

 

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

 

// OnCustomDataRequest example...

procedure TForm1.EurekaLog1CustomDataRequest(

  EurekaExceptionRecord: TEurekaExceptionRecord;

  DataFields: TStrings);

begin

  // Add custom data to the Log text...

   DataFields.Add('Field=My custom data...';

end;

 

See the "CustomDataRequest-Examples" topic for further details.

 

 

 

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

 

// OnCustomFieldsRequest example...

procedure TForm1.EurekaLog1CustomWebFieldsRequest(

  EurekaExceptionRecord: TEurekaExceptionRecord;

  WebFields: TStrings);

begin

  // Send the software identification ID to the Web server

   FieldsName.Add('Software_ID');   

   FieldsValue.Add('F0E0D0');

end;

 

See the "CustomFieldsRequest-Examples" topic for further details.

 

 

 

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

 

// OnPasswordRequest example...

procedure TForm1.EurekaLog1PasswordRequest(

  EurekaExceptionRecord: TEurekaExceptionRecord;

  var Password: string);

begin

  // Require the password to the user...

  InputQuery('Request', 'Insert the BUG report password', Password);

end;

 

See the "PasswordRequest-Examples" topic for further details.

 

 

 

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

 

// Close the dialog.

procedure TForm1.EurekaLog1CustomButtonClickNotify(

   EurekaExceptionRecord: TEurekaExceptionRecord; 

   var CloseDialog: Boolean);

begin

   CloseDialog := True;

end;

 

See the "CustomButtonClickNotify-Examples" topic for further details.




Send feedback... Build date: 2022-01-17
Last edited: 2018-06-14
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/old_teurekalog_examples.php