If a runtime error happens in script run by java's javascript engine, I can happily get the error and importantly the line number from the exception.
When loading a "level" I evaluate a level script to initialise things if needed, this also evaluates the functions that are optionally used by various events (if they are found)
However if there is for example a syntax error while evaluating (not running!) a function I get a message like this
[java] sun.org.mozilla.javascript.EvaluatorException: syntax error (<Unknown source>#1) in <Unknown source> at line number 1 at line 1,-1
even if the error is later in a function than its first line
how can I get the line and ideally the column number in the script where the error occurs?