what Exception.RaisingException does (calling SetInnerException which calls AcquireExceptionObject setting the result to its FInnerException field).
In fact there is some commented out code in HookExceptionRaisingException that indicates that it has been there but for some reason was removed.
I added the following lines after the
Code: Select all
if Self.InstanceSize >= 28 then begin
Code: Select all
if Self.AcquireInnerException and (TObject(ExceptObject) is ExceptionClass) then
Self.InnerException := AcquireExceptionObject;