Skip to content

Commit

Permalink
fix: remove name and message from stack trace
Browse files Browse the repository at this point in the history
  • Loading branch information
TrickyPi committed Dec 13, 2022
1 parent 243eba5 commit a4e5c9a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cli/logging.ts
Expand Up @@ -30,7 +30,7 @@ export function handleError(error: RollupError, recover = false): void {
}

if (error.stack) {
stderr(dim(error.stack));
stderr(dim(error.stack.replace(`${nameSection}${error.message}\n`, '')));
}

stderr('');
Expand Down
5 changes: 1 addition & 4 deletions test/cli/samples/custom-frame-with-pos/_config.js
Expand Up @@ -7,9 +7,6 @@ module.exports = {
stderr: stderr =>
assertIncludes(
stderr,
'[!] (plugin at position 1) Error: My error.\n' +
'main.js (1:5)\n' +
'custom code frame\n' +
'Error: My error.'
'[!] (plugin at position 1) Error: My error.\n' + 'main.js (1:5)\n' + 'custom code frame\n'
)
};
2 changes: 1 addition & 1 deletion test/cli/samples/custom-frame/_config.js
Expand Up @@ -8,7 +8,7 @@ module.exports = {
assertIncludes(
stderr,
'[!] (plugin at position 1) Error: My error.\n' +
'main.js\ncustom code frame\nError: My error.\n' +
'main.js\ncustom code frame\n' +
' at Object.'
);
assertIncludes(stderr, 'rollup.config.js:9:19');
Expand Down

0 comments on commit a4e5c9a

Please sign in to comment.