Page 1 of 1

How Do I Use "AdditionalFields"?

Posted: Sat Sep 23, 2017 12:58 am
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

Re: How Do I Use "AdditionalFields"?

Posted: Sat Sep 23, 2017 8:06 am
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?

Re: How Do I Use "AdditionalFields"?

Posted: Sat Sep 23, 2017 8:18 am
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

Re: How Do I Use "AdditionalFields"?

Posted: Sat Sep 23, 2017 9:38 am
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

Re: How Do I Use "AdditionalFields"?

Posted: Sat Sep 23, 2017 10:01 am
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

Re: How Do I Use "AdditionalFields"?

Posted: Sat Sep 23, 2017 10:16 am
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.