RegisterHiddenExceptionHandler problem with 3.0

delphi package - automated exception handling
Post Reply
robin
Posts: 1
Joined: Wed Sep 14, 2005 1:04 am

RegisterHiddenExceptionHandler problem with 3.0

Post by robin »

I have registered a exception handler for hidden exceptions, but it never produces and error log, why is that?

heres the declaration
madExcept.RegisterHiddenExceptionHandler(CustomHandledException, stDontSync);

and the function

procedure CustomHandledException(const exceptIntf : IMEException;
var handled : boolean);
begin
//exceptIntf.BeginUpdate;
//exceptIntf.BugReportHeader['command line'] := 'HIDDEN';
//exceptIntf.EndUpdate;

handled := false; //test code

//Sleep(1000); //give bugreport time to render fully
//TpgLogMgr.inst.doExceptionLogging(exceptIntf);
end;

and the test call to see if it works
try
raise Exception.create('testing hidden exception');
except
on E: Exception do
ShowMessage('test');
end;

has anyone else had problems showing hidden exceptions?
madshi
Site Admin
Posts: 10339
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

I'll have a look at this, maybe there's a bug in madExcept.
madshi
Site Admin
Posts: 10339
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

It works for me. What exactly happens and what not? Respectively what did you expect to happen? Can you please add a "MessageBox(0, 'test', 'test', 0)" line to your "CustomHandledException" function? Does it get called?

Btw, instead of:

Code: Select all

exceptIntf.BugReportHeader['command line'] := 'HIDDEN';
you can also do this:

Code: Select all

exceptIntf.BugReportHeader['command line'] := '';
That removes the command line header entry completely.
Post Reply