Stack trace rewriting goes haywire if `error.stack` already accessed #116

domenic opened this Issue Sep 26, 2012 · 0 comments


None yet
1 participant

domenic commented Sep 26, 2012

In this case, Error.prepareStackTrace is never called, so we never get an array, and getStackFrames ends up returning a string.

Via Q Continuum

domenic was assigned Sep 26, 2012

@domenic domenic added a commit that referenced this issue Oct 14, 2012

@ef4 @domenic ef4 + domenic Don't mangle stack traces when an exception is seen twice.
It's possible for the same exception to hit two different `end()` points, causing it to pass through the stack trace formatter twice.

On the second pass, `error.stack` is already a string, and the formatter mangles it by inserting newlines after every character.

Fixes #121 and #116. Related: #117.

domenic closed this Oct 14, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment