stacktracejs / stackframe

JS Object representation of a stack frame.
https://www.stacktracejs.com/#!/docs/stackframe
MIT License
77 stars 16 forks source link

toString does not match V8 stack trace format #22

Closed niftylettuce closed 5 years ago

niftylettuce commented 5 years ago

Could we modify toString so that it closely matches https://v8.dev/docs/stack-trace-api#appendix%3A-stack-trace-format instead of current format?

Calling Error.prepareStackTrace(err, stackframes) does not give proper output.

niftylettuce commented 5 years ago

Here is how Node prepares it:

https://github.com/nodejs/node/blob/b6bfc193788b1838bee73d584fe089e1104b9f88/src/node_errors.cc#L142-L175

eriwen commented 5 years ago

This is fixed by #23. Thanks @niftylettuce!