i am using madExcept and have a problem with nested Exception. When i nest exceptions with RaiseOuterException and madExcept is enabled then the inner exception gets lost (value is nil). When I disable madExcept all is fine.
I am using madExcept with version 2.8.3.0 (but I could also reproduce it with version 2.8.8.0) and Delphi 10 Seattle. There were no special settings for madExcept, only the default values. Below a small console-project with which I tested it. With madExcept the variable 'LInnerException' was nil and without the variable contains the first exception.
Do I have to set some options or is madExcept not able to handle nested exceptions?
- Code: Select all
program TestProject;
{$APPTYPE CONSOLE}
uses
System.SysUtils;
var
LInnerException: Exception;
begin
try
try
raise Exception.Create('First Exception...');
except
Exception.RaiseOuterException(Exception.Create('Second Exception...'));
end;
except
on E: Exception do
begin
LInnerException := E.InnerException;
end;
end;
end.