Implement ReturnAddress for raising exceptions
Original Reporter info from Mantis: Bi0T1N @Bi0T1N
-
Reporter name: Bi0T1N
Original Reporter info from Mantis: Bi0T1N @Bi0T1N
- Reporter name: Bi0T1N
Description:
For Delphi compatibility (but also for simpler code in general) the following
raise Exception.Create('test') at ReturnAddress;
needs to be supported. It can already be achieved by using
raise Exception.Create('test') at get_caller_addr(get_frame), get_caller_frame(get_frame);
Additional information:
https://forum.lazarus.freepascal.org/index.php/topic,38153.0.html
https://stackoverflow.com/questions/30417218/undocumented-intrinsic-routines
https://chuacw.ath.cx/development/b/chuacw/archive/2014/05/30/undocumented-delphi-routines.aspx
https://stackoverflow.com/questions/8950513/what-does-at-returnaddress-mean-in-delphi
Mantis conversion info:
- Mantis ID: 37766
- Version: 3.3.1