tapjs / stack-utils

Captures and cleans stack traces.
https://www.npmjs.com/package/stack-utils
MIT License
190 stars 35 forks source link

last line of leading multiline message remains in cleaned stack #53

Open boneskull opened 3 years ago

boneskull commented 3 years ago
// in REPL
const StackUtils = require('stack-utils');
const stack = new StackUtils();
try {
  throw new TypeError(`foo
bar
baz`);
} catch (err) {
  console.log(stack.clean(err.stack));
}

actual:

baz
    REPL18:2:9

expected:

either the entire message or none of it

conartist6 commented 2 years ago

This is fixed stack-tools.