MESettings.ShowSetting

delphi package - automated exception handling
Post Reply
cefird1
Posts: 15
Joined: Mon Nov 07, 2005 5:12 pm

MESettings.ShowSetting

Post by cefird1 »

I have a program that can be run in interactive or batch mode. The mode is determined by a command line parameter. In batch mode, Application.ShowMainForm is set to false in the FormCreate method to hide the main form.

I have used MadExcept Options to set MadExcept to automatically save and send the exceptions. In batch mode, I do not want the Exception Dialog to be displayed, but all other MadExcept actions are to be the same as interactive mode.

With MadExcept 2, everything worked fine if I set ShowExceptionBox to false.

With MadExcept 3, I can prevent the Exception Dialog from showing by setting MESettings.ShowSetting to ssNothing, but the exceptions are not sent. Am I doing anything wrong?
cefird1
Posts: 15
Joined: Mon Nov 07, 2005 5:12 pm

Post by cefird1 »

Oops, I meant MESettings.GeneralShowSetting
madshi
Site Admin
Posts: 10766
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Strange. Do the mails get sent when you are in interactive mode with madExcept 3?

Please try the latest beta build:

http://madshi.net/madCollectionBeta.exe
cefird1
Posts: 15
Joined: Mon Nov 07, 2005 5:12 pm

Post by cefird1 »

Yes the email is sent in interactive mode.

I just tried it with beta 4, same results
cefird1
Posts: 15
Joined: Mon Nov 07, 2005 5:12 pm

Post by cefird1 »

I removed MESettings.GeneralShowSetting and got it to work the way I wanted with the following:

Code: Select all

procedure TfrmMain.MadExceptionHandler1Exception(
  const exceptIntf: IMEException; var handled: Boolean);
var
  s : string;
begin
  if Batch then
  begin
    s := exceptIntf.GetBugReport(true);
    AutoSaveBugReport(s);
    SendBugReport(s,nil);
    CloseApplication;
    handled := true;
  end;
end;
I tried AutoSendBugReport, but it would not send the email. Maybe this will help you track down the problem.
madshi
Site Admin
Posts: 10766
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Ah wait! So you've configured madExcept to automatically close when an exception occurs? Yes, there's known bug that auto mailing doesn't work if you configure madExcept that way. Is on my to do list already...
madshi
Site Admin
Posts: 10766
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Should be fixed in the latest beta build:

http://madshi.net/madCollectionBeta.exe
cefird1
Posts: 15
Joined: Mon Nov 07, 2005 5:12 pm

Post by cefird1 »

3.0a beta 6 has fixed the problem.

Thank you
madshi
Site Admin
Posts: 10766
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Thanks for the quick feedback!
Post Reply