Exception in Delphi - how to get the LineNo in Script?

Hello,
one of my Delphi-Methods raises an Exception.
Now I would like to know, which line is processed when the Exception comes up.

I found this code:
if Exec.ExceptionCode <> erNoError then _
_ showmessage(’[Runtime Error] : ’ + TIFErrorToString(Exec.ExceptionCode, Exec.ExceptionString) +

_ ’ in ’ + IntToStr(Exec.ExceptionProcNo) + ’ at ’ + IntToSTr(Exec.ExceptionPos));_

But this did not help.

Thank you
Klaus

There’s an On*Line event, if you have debug info available it will trigger for every ran line and you can store the line to maintain the last line that ran before an exception.

Thank you Carlo,