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?
RegisterHiddenExceptionHandler problem with 3.0
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:
you can also do this:
That removes the command line header entry completely.
Btw, instead of:
Code: Select all
exceptIntf.BugReportHeader['command line'] := 'HIDDEN';
Code: Select all
exceptIntf.BugReportHeader['command line'] := '';