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 { try {
fn(); fn();
} catch (err) { } catch (err) {
if (err instanceof Error) console.error(`In ${desc}:`);
err.message = `In ${desc}:\n ${err.message}`;
throw err; throw err;
} }
}, },

Loading…
Cancel
Save