Adding custom information to bug report

delphi package - automated exception handling
Post Reply
jeffk100
Posts: 2
Joined: Mon Jun 17, 2013 9:16 am

Adding custom information to bug report

Post by jeffk100 »

My application keeps a history of user actions , mainly so that it can implement an "Undo" function. This information would be very useful when diagnosing a crash. Is it possible to add custom application data to the bug report that gets emailed back?
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: Adding custom information to bug report

Post by madshi »

Sure. See the bottom of this page to see how to *remove* information from the bug report header. In the same way you can also add some:

http://help.madshi.net/HowToUseMadExcept.htm

And if you use "BugReportSections" instead of "BugReportHeader", you can also add full sections (show in a separate tab by the madExcept exception box).
jeffk100
Posts: 2
Joined: Mon Jun 17, 2013 9:16 am

Re: Adding custom information to bug report

Post by jeffk100 »

Thanks, that works very nicely :D
softtouch
Posts: 111
Joined: Sat Jun 20, 2009 10:08 am
Contact:

Re: Adding custom information to bug report

Post by softtouch »

Hm I must miss something, its not adding anything for me to the bugreport.

I tried exceptintf.bugreportheader.add and exceptintf.additionalfields.add, and nothing gets added.

Code: Select all

procedure ExceptionHandler(const ExceptIntf: IMEException; var Handled: Boolean);
begin
	Handled := False;

	ExceptIntf.BugReportHeader.Add('Application',Application.Title);

	ExceptIntf.AdditionalFields.Add('Application1',Application.Title);
end;


initialization
	RegisterExceptionHandler(ExceptionHandler, stTrySyncCallOnSuccess);

madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: Adding custom information to bug report

Post by madshi »

Does it work if you use "stDontSync"? The "AdditionalFields" is for SMTP mailing, what you want is "ExceptIntf.BugReportHeader['Application'] := Application.Title;".
Post Reply