How Do I Use "AdditionalFields"?

delphi package - automated exception handling
Post Reply
SteveG
Posts: 15
Joined: Sat Sep 23, 2017 12:53 am

How Do I Use "AdditionalFields"?

Post by SteveG »

This is a method I call when my application first starts:

Code: Select all

procedure TfrmMain.SetupMadExcept;
var
   Settings: IMEModuleSettings;
begin
   Settings := MESettings();

   if Global.SystemRules.ErrorReporting = EXCEPTIONS_AUTOMATICALLY_SEND then
   begin
      Settings.AutoSend := True;
      Settings.SuspendThreads := False;
      Settings.ShowPleaseWaitBox := False;
      Settings.AutoContinue := True;
      Settings.SendInBackground := True;
      Settings.Filter1ShowSetting := ssNothing;
      Settings.GeneralShowSetting := ssNothing;
      Settings.Filter1NoScreenShot := True;
      Settings.GeneralNoScreenShot := True;
      Settings.AdditionalFields['email'] := Global.LicenceDetails.LicenceEmail;
      Settings.AdditionalFields['serial_number'] := Global.LicenceDetails.SerialNumber;
      Settings.AdditionalFields['company'] := Global.LicenceDetails.LicenceName;
   end
   else if Global.SystemRules.ErrorReporting = EXCEPTIONS_PROMPT_USER then
   begin
      Settings.AutoSend := False;
      Settings.SuspendThreads := True;
      Settings.ShowPleaseWaitBox := True;
      Settings.AutoContinue := False;
      Settings.SendInBackground := False;
      Settings.Filter1ShowSetting := ssFullBox;
      Settings.GeneralShowSetting := ssFullBox;
      Settings.Filter1NoScreenShot := False;
      Settings.GeneralNoScreenShot := False;
      Settings.AdditionalFields['email'] := Global.LicenceDetails.LicenceEmail;
      Settings.AdditionalFields['serial_number'] := Global.LicenceDetails.SerialNumber;
      Settings.AdditionalFields['company'] := Global.LicenceDetails.LicenceName;
   end;
end;
The AdditionalFields I add don't appear in the received report. Is there something else I need to do?

Thanks.

= Steve
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: How Do I Use "AdditionalFields"?

Post by madshi »

These fields are for HTTP uploading. I suppose you want to add something to bug report header? Or what is it you want to do exactly?
SteveG
Posts: 15
Joined: Sat Sep 23, 2017 12:53 am

Re: How Do I Use "AdditionalFields"?

Post by SteveG »

madshi wrote:These fields are for HTTP uploading. I suppose you want to add something to bug report header? Or what is it you want to do exactly?
Yes, I want to add this information to the emailed reports so I have an idea of where they came from.

Thanks.

= Steve
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: How Do I Use "AdditionalFields"?

Post by madshi »

See the bottom of this page for information about how to remove items from the bug report header. In the same way you can also add information:

http://help.madshi.net/HowToUseMadExcept.htm
SteveG
Posts: 15
Joined: Sat Sep 23, 2017 12:53 am

Re: How Do I Use "AdditionalFields"?

Post by SteveG »

madshi wrote:See the bottom of this page for information about how to remove items from the bug report header. In the same way you can also add information:

http://help.madshi.net/HowToUseMadExcept.htm
So the only way to add this information is to create and register my own exception handler?

= Steve
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: How Do I Use "AdditionalFields"?

Post by madshi »

Yes, that's the way it currently is. It's just 5 lines more code, though, so it should not be a big deal.
Post Reply