XE2 UP has a built-in implementation function (ReturnAddress). You can now
write the cross-platform for "lpexceptions.pas":
implementation
{$IFDEF Delphi}
{$IF CompilerVersion < 21.00}
function ReturnAddress: Pointer;
asm
MOV EAX, [EBP+4]
end;
{$IFEND}
{$ENDIF}
procedure _LapeException(Msg: lpString); inline;
{$IFDEF FPC}
begin
...
end;
{$ELSE}
begin
raise lpException.Create(Msg) at ReturnAddress;
end;
{$ENDIF}
...
Original issue reported on code.google.com by pult....@gmail.com on 8 Dec 2012 at 2:49
Original issue reported on code.google.com by
pult....@gmail.com
on 8 Dec 2012 at 2:49