I was wrong, again

In my previous post An improved Abstract Error Handler for Delphi I claimed there was a change in the Delphi RTL between Delphi 10.1 and 10.2. I have no idea why my tests looked like that was the case. Maybe a stale dcu file somewhere? In fact the change was made between Delphi XE and XE2.

It happened because the _AbstractError procedure in the System unit used Assembler code up to Delphi XE and Pascal code from XE2 on, and that unit was compiled with stackframes enabled. This resulted in 4 extra bytes on the stack. So the offset was 12 bytes instead of 8.

I should also mention, that the code only works on Win32. Win64 and other platforms are not supported.

There was a discussion about this in the international Delphi Praxis forum.