Examples

Top  Previous  Next

In this example, the scenario is: The license information for out product is stored in the file %LICENSE_URL%/EurekaLog.license, and the current user's license has expired. So, in case a LicenseExpiredException has been thrown, it would be good to have access to the EurekaLog.license file, right? No problem, we attach that file to the bug report, too.

 

 

C# example:

private void eurekaLog1_AttachedFilesRequest(Exception Error, EurekaLogSystem.EurekaLogOptions Options, EurekaLogSystem.StringList AttachedFiles)
{
  if (Error is LicenseExpiredException)
  {
      AttachedFiles.Add(String.Format(@"{0}\EurekaLog.license", Environment.ExpandEnvironmentVariables("%LICENSE_URL%")));
  }
}

 

 

Visual Basic example:

Private Sub EurekaLog1_AttachedFilesRequest(ByVal [Error] As System.Exception, ByVal Options As EurekaLogSystem.EurekaLogOptions, ByVal AttachedFiles As EurekaLogSystem.StringList) Handles EurekaLog1.AttachedFilesRequest
  If TypeOf [Error] Is LicenseExpiredException Then
       AttachedFiles.Add(String.Format("{0}\EurekaLog.license", Environment.ExpandEnvironmentVariables("%LICENSE_URL%")))
  End If
End Sub