mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
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>
This commit is contained in:
1 parent
7ceea2a6a1
commit
a218fa381f
1 file changed
+1
-2
+1
-2
@@ -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;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user