Browse Source

test: fix WPT.test()'s error handling

Changing err.message after the construction of Error doesn't seem to
change err.stack.

PR-URL: https://github.com/nodejs/node/pull/11436
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
v6
Timothy Gu 8 years ago
parent
commit
a218fa381f
  1. 3
      test/common.js

3
test/common.js

@ -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;
}
},

Loading…
Cancel
Save