Advertisement
RandomClear

How to get bug report file name

Mar 22nd, 2015
430
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.95 KB | None | 0 0
  1. // Please use OnCustomFileName event when possible.
  2. // You can inspect and modify (if needed) all file names, including bug report file name.
  3. // See: http://www.eurekalog.com/help/eurekalog/topic_type_eevents_televcustomfilenamemeth.php
  4. // (for bug report file - you are interested in AFileType = ftSavedBugReport)
  5.  
  6. // Alternatively, you can use such code:
  7.  
  8. uses
  9.   EModules;
  10.  
  11. // Global:
  12.  
  13. BugReportFileName := CurrentEurekaLogOptions.ExpandEnvVars(CurrentEurekaLogOptions.OutputLogFile(''));
  14.  
  15. // Event handler:
  16.  
  17. procedure OnExceptionNotify(const ACustom: Pointer; AExceptionInfo: TEurekaExceptionInfo; var AHandle: Boolean; var ACallNextHandler: Boolean);
  18. var
  19.   BugReportFileName: String;
  20. begin
  21.   BugReportFileName := AExceptionInfo.Options.ExpandEnvVars(AExceptionInfo.Options.OutputLogFile(''));
  22. end;
  23.  
  24. // Be aware, that global code can not expand some variables (such as %BugID% - because those does not exist outside of exception processing code).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement