Saving the report form within an exception handler

delphi package - automated exception handling
Post Reply
russellweetch
Posts: 20
Joined: Mon Feb 07, 2011 3:39 pm

Saving the report form within an exception handler

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

Re: Saving the report form within an exception handler

Post by madshi »

What does "Do create a new exception" mean exactly? The grammar isn't clear to me.
russellweetch
Posts: 20
Joined: Mon Feb 07, 2011 3:39 pm

Re: Saving the report form within an exception handler

Post by russellweetch »

I mean do I use the NewException function (as in the example I gave) or should I do something else?
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: Saving the report form within an exception handler

Post 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.
Post Reply