Error stack strawman
Gary Guo
nbdd0121 at hotmail.com
Thu Feb 18 00:19:27 UTC 2016
The strawman looks very old, so I've created a new one.
Repo: https://github.com/nbdd0121/es-error-stack
I've collected many information about current implementation from IE, Edge, Chrome and Firefox, but missing Safari's. Many thanks if some one can collect these info and create a pull request.
I haven't write anything for API part, as you will see from the "concerns" part, there are many edge cases to be considered: cross-realm, native, global, eval, new Function, anonymous and tail call. All of these need to be resolved before we can trying to design an object representation of stack frame.
Personally I suggest "(global code)" for global, "(eval code)" for eval, "(Function code)" for new Function, "(anonymous function)" for anonymous function/lambda. For native call, we can simply replace filename & line & column by "(native)". For tail call I suggest add "(tail)" some where. I also suggest adding "(other realm)" or something alike to indicate realm boundary is crossed.
For object representation, I hope something like ```{ name: 'string', // (global code), etc for special case, with parenthesis source: 'url', // (native) for native code, with parenthesis line: 'integer', column: 'integer', isTail: 'boolean'}```And null entry indicating crossing realm. BTW, shall we add reference to function in the object representation?
Gary Guo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160218/82b0bf32/attachment-0001.html>
More information about the es-discuss
mailing list