Okay. I've a datamodule which will be created at first in my application with the following initialization code:
Code: Select all
initialization
{ register exception handler }
RegisterHiddenExceptionHandler(ExceptionFilter, stDontSync);
the exception handler is implemented as followed:
Code: Select all
{$IFDEF USE_MADEXCEPT_3}
procedure ExceptionFilter(const exceptIntf : IMEException; var Handled : Boolean);
{$ELSE}
procedure ExceptionFilter(Frozen: Boolean; ExceptObject: TObject; ExceptAddr: Pointer;
CashedThreadId : dword; var BugReport: string; var ScreenShot: string;
var CanContinue: Boolean; var Handled: Boolean);
{$ENDIF}
begin
{ attach license-informations to bug report }
{$IFDEF USE_MADEXCEPT_3}
with Planner.Enviroment.License, exceptIntf do
begin
BugReportHeader['license holder'] := UserName;
BugReportHeader['pharmacy name' ] := PharmacyName;
BugReportHeader['owner name' ] := OwnerName;
BugReportHeader['address' ] := Address;
end;
{$ELSE}
if ExceptObject <> nil then
with Planner.Enviroment.License do
begin
BugReport := Format(
'license holder : %s' + #13#10 +
'pharmacy name : %s' + #13#10 +
'owner name : %s' + #13#10 +
'address : %s' + #13#10 +
BugReport, [UserName, PharmacyName, OwnerName, Address]
);
end;
{$ENDIF}
end;
The compiler-directive is set to use ME3! I've created a simple button which creates a sample exception. If I click on it, ME3 pops up and show me the error but W/O any additional informations. If I modify the code as followed...
Code: Select all
with Planner.Enviroment.License, exceptIntf do
begin
BugReportHeader['license holder'] := UserName;
BugReportHeader['pharmacy name' ] := PharmacyName;
BugReportHeader['owner name' ] := OwnerName;
BugReportHeader['address' ] := Address;
end;
Handled := False; // <- THIS LINE WAS ADDED!
...ME3 pops up (as before) BUT WITH the additional informations included - that's fine for now, but....
now, everytime a SILENT exception occurs, ME3 pop up, too!!! I've some places in my app where I handle exceptions by myself like:
Code: Select all
try
// do something which may occur in an exception
...
except
{ catch all errors }
end;
ME3 will now also occur on THIS exceptions! If I remove the line "Handled := False;", my already handled exceptions will be proceeded fine and ME3 only pop's up on UNHANDLED exceptions, BUT NO additional informations are added!
Greets,
Marc