MESettings.ShowSetting
MESettings.ShowSetting
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?
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?
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
Please try the latest beta build:
http://madshi.net/madCollectionBeta.exe
I removed MESettings.GeneralShowSetting and got it to work the way I wanted with the following:
I tried AutoSendBugReport, but it would not send the email. Maybe this will help you track down the problem.
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;