Using Madexcept in Server software

delphi package - automated exception handling

Using Madexcept in Server software

Postby Oliver » Fri May 14, 2004 12:45 am

I have peppered MadExcept throughout my program to handle various types of exception and email me the results. When I use a datamodule, it is sometimes in an application that used by a user, and sometimes in a server. The application reports the error to the user, but the server emails me and continues. When I debug either, it also emails me.

I'd like to be able to use the madexcept settings to email me when something happens in the server, or to log to something like the Event Viewer in NT/2000, or just a log file, but not just exceptions, good things as well.

I'd also like to have different madexcept settings when I am debugging. I'd like to be able to turn on or off some exceptions when debugging, not just permanently, but after I have seen them once. For instance I get a lot of OLE Errors, which I ignore. But if I turn off integrated debugging, I don't see other exceptions. I'd also like the emails not to occur while I am debugging, as this sometimes takes a brief while, especially when I am off site and running on a slow link. So I'd like a different set of options when debugging in Delphi from running not in Delphi.

Oliver Townshend
Posts: 4
Joined: Mon Apr 19, 2004 11:14 pm

Postby madshi » Fri May 14, 2004 9:43 am

Hi Oliver,

you can configure most options at runtime. E.g. the following code disabled auto mailing if your program runs inside of a debugger:

uses madExcept;

// put this into one of your units
if IsDebuggerPresent then
AutoMail := false;

About ignoring some exceptions inside of the debugger: Check out the FAQ #1 (in the documentation). That should help telling madExcept to ignore some specific exceptions under specific circumstances. You need to do the ignore logic yourself, though (e.g. counting exceptions and only show them the first time or things like that).

Does that help?
Site Admin
Posts: 10200
Joined: Sun Mar 21, 2004 5:25 pm

Using Madexcept in Server software

Postby Oliver » Sun May 16, 2004 11:10 pm

Thanks, I'll give these things a try.

Posts: 4
Joined: Mon Apr 19, 2004 11:14 pm

Return to madExcept

Who is online

Users browsing this forum: No registered users and 10 guests