I have a project that was working great with madexcept in XE3.
I now moved to XE10.1 and my project works OK. I simulated an error in the code to make sure madexcept is working (with the same settings) but nothing really happens when the error occurred (a simple division by 0 or using a tstringlist without first creating it).
my code is basically the following
Code: Select all
initialization
RegisterExceptionHandler(frmMain.ExceptionFilter, stTrySyncCallOnSuccess);
madexcept.InstallUnhandledExceptionFilter();
private
procedure ExceptionFilter(const exceptIntf: IMEException; var Handled: Boolean);
procedure TfrmMain.ExceptionFilter(const exceptIntf: IMEException; var Handled: Boolean);
var
res: string;
Values: array [0 .. 0] of string;
begin
try
Handled := True; <<<<<<<<<<<<<<<<<<<<<<<<<<<
.
.
.
end;
If I raise Exception.Create('blah blah'); then it works as expected.
A simple code I was using
Code: Select all
procedure TfrmMain.Button1Click(Sender: TObject);
var a,b: extended;
begin
a := 10/0; <<<< I expected for it to fail here
b := a + 1;
end;
procedure TfrmMain.Button1Click(Sender: TObject);
var tmp: tstringlist;
begin
tmp.text := 'dddd'; <<<<< I expected for it to fail here
end;
Thanks