How Do I Use "AdditionalFields"?

delphi package - automated exception handling

How Do I Use "AdditionalFields"?

Postby SteveG » Sat Sep 23, 2017 12:58 am

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
SteveG
 
Posts: 10
Joined: Sat Sep 23, 2017 12:53 am

Re: How Do I Use "AdditionalFields"?

Postby madshi » Sat Sep 23, 2017 8:06 am

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?
madshi
Site Admin
 
Posts: 9414
Joined: Sun Mar 21, 2004 5:25 pm

Re: How Do I Use "AdditionalFields"?

Postby SteveG » Sat Sep 23, 2017 8:18 am

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
SteveG
 
Posts: 10
Joined: Sat Sep 23, 2017 12:53 am

Re: How Do I Use "AdditionalFields"?

Postby madshi » Sat Sep 23, 2017 9:38 am

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
madshi
Site Admin
 
Posts: 9414
Joined: Sun Mar 21, 2004 5:25 pm

Re: How Do I Use "AdditionalFields"?

Postby SteveG » Sat Sep 23, 2017 10:01 am

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
SteveG
 
Posts: 10
Joined: Sat Sep 23, 2017 12:53 am

Re: How Do I Use "AdditionalFields"?

Postby madshi » Sat Sep 23, 2017 10:16 am

Yes, that's the way it currently is. It's just 5 lines more code, though, so it should not be a big deal.
madshi
Site Admin
 
Posts: 9414
Joined: Sun Mar 21, 2004 5:25 pm


Return to madExcept

Who is online

Users browsing this forum: No registered users and 4 guests

cron