Skip to content

Commit

Permalink
test: fix WPT.test()'s error handling
Browse files Browse the repository at this point in the history
Changing err.message after the construction of Error doesn't seem to
change err.stack.

PR-URL: #11436
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
TimothyGu committed Mar 1, 2017
1 parent 7ceea2a commit a218fa3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,7 @@ exports.WPT = {
try {
fn();
} catch (err) {
if (err instanceof Error)
err.message = `In ${desc}:\n ${err.message}`;
console.error(`In ${desc}:`);
throw err;
}
},
Expand Down

0 comments on commit a218fa3

Please sign in to comment.