Page 1 of 1

Saving the report form within an exception handler

Posted: Wed Feb 15, 2017 11:40 am
by russellweetch
I'm sure I used to do this in an old application but can't find it now.

How do you force MadExcept to save the bug report within an exception handler? This is in a webbroker application. Do create a new exception e.g.

Try
....
Except
on E: Exception do
begin
MadExcept.NewException(etNormal, E).SaveBugReport(0);
//Do Other Stuff
end;
End;

Thanks.

Re: Saving the report form within an exception handler

Posted: Wed Feb 15, 2017 1:25 pm
by madshi
What does "Do create a new exception" mean exactly? The grammar isn't clear to me.

Re: Saving the report form within an exception handler

Posted: Thu Feb 16, 2017 10:28 am
by russellweetch
I mean do I use the NewException function (as in the example I gave) or should I do something else?

Re: Saving the report form within an exception handler

Posted: Thu Feb 16, 2017 10:30 am
by madshi
You could do it that way, or you could bypass some of the processing by calling madExcept.CreateBugReport() to get the bug report as a simple string, and then you can use nadExcept.AutoSaveBugReport or madExcept.SaveBugReport to save it.