Exception address

Hi,

I have exception handling in scripter

init;
try
  dosomething;
  dosomething1;
  blaa blaah
finally
  cleanup;
end;
excecution raises an exception, is there a way to get source line, which causes exception?


Studied atscripter a little bit and modified

procedure TatVirtualMachine._TryExcept;
...
  except
    on ex: Exception do
    begin
+     if assigned(FCurrentInstruction) then
+     begin
+      ex.Message := ex.Message + #13+ Script.ErrorComplement(FcurrentInstruction^.vDebugInfo);
+      end;
      dec(FInTryExcept);
...

Now I can see Error location in LastExceptionMessage.
If this is correct, could this (or something like this) be included in future releases?

we have included two new properties: LastExceptionLine and LastExceptionCol. You will then be able to use it as you want. Modifying the exception message directly would break backward compatibility.

thanks!