For extended error reporting, I handle errors like this:
Procedure LogException(E : Exception;....)
Var S : String;
Begin
...
ASM
if (E.FJSError===undefined)
var stack = E.stack.toString().split(/\r\n|\n/);
else
var stack = E.FJSError.stack.toString().split(/\r\n|\n/);
S = stack[1];
END;
// Do something with stack trace in S
End;
This is broken in 1.6. as E.stack resp. E.FJSError.stack no longer exists.
I investigated a little further and found out that the declaration of class Exception was changed in 1.6 in that the Javscript error object is no longer created.
The difference is that FJSError resp JSError no longer exists in 1.6.
Would you mind to explain why the JS error object is no longer created? This effectively also removes the callstack that comes with the JS error object and therefore breaks any error reporting relying on the callstack.
This is part of the pas2js RTL, so we will check this with the pas2js team what the rationale behind this is. It was changed between pas2js v1.4 and pas2js v2.0.