I discovered this week that there is no good public way to print an Error
in the JSAPI. This is not ideal.
The easiest workaround is to write your own try/catch block in JavaScript
and print the various parts of the Error object in the catch block.
That's not what the JS shell does, though. The shell takes advantage of
SpiderMonkey-internal APIs, including at least `js::PrintError()`. If you'd
like to wrap that behavior up into a nice, public
JS::PrintAndClearPendingException(cx, stderr) function, I'd take that
patch. It wouldn't be hard!
-j
> _______________________________________________
> dev-tech-js-engine mailing list
>
dev-tech-...@lists.mozilla.org
>
https://lists.mozilla.org/listinfo/dev-tech-js-engine
>