Page 1 of 1

How to get MadExceptHandler to always fire?

PostPosted: Sat Oct 20, 2018 7:37 pm
by CBelanger
Hi, Mathias:

Using latest madExcept and have:
RegisterExceptionHandler(MadExceptionHandler1Exception, stTrySyncCallAlways, epMainPhase);

and:

procedure MadExceptionHandler1Exception(const exceptIntf: IMEException;
var Handled: boolean);
var
SectionNumber: integer;
sApplicationSteps, sApplicationSettings: string;
AppCopyRight, DBUpdateInfo, AppVersion, ClinicName, UserComment,
LogNotes: string;
etc...

In spite of doing what I thought would fire this exception handler for ALL madexcept triggered bug reports, I find that for the most part any system related bugs from the Delphi files get the madExcept bug report but not the additions to the bug report that I make in this exception handler. It appears that this event is not fired in those cases.

What I would like to do now that I have MantisBT is to add information to then be uploaded to the MantisBT custom fields (the actual User Name, and using some simple logic to start categorizing the nature of the bug being sent, e.g. Test, Database, Program, then sub sets of those last two. This second issue of using SOAP to upload the information and put into the MantisBT custom fields will be asked in a separate topic. The issue I most concerned about is making sure that the Exception Handler is fired for EVERY bug that is caught by madExcept.
Thank you!
Chuck

Re: How to get MadExceptHandler to always fire?

PostPosted: Tue Nov 13, 2018 6:40 pm
by madshi
So you're saying the madExcept dialog pops up, but your handler seems to be ignored? FWIW, the dialog pops up very early, so that the user doesn't get a crashed/frozen application for several seconds, wondering what's going on. So the exception box is shown early while exception handling might still be running in background threads. So it's possible that your handler might be called only *after* the exception box was already shown. You could try running your handler in an earlier "phase". Maybe that already solves the issue?