diff options
author | Fedor Indutny <fedor@indutny.com> | 2015-07-05 11:20:26 -0700 |
---|---|---|
committer | Rod Vagg <rod@vagg.org> | 2015-08-04 11:56:16 -0700 |
commit | ef65321083d85be0e33ffaa06e7b71fed49e571c (patch) | |
tree | 9ab72470f059c6ddabcbaea2717e2ee9eb7df3f2 /test/sequential | |
parent | 9d34bd114774f88af967f2e0e29c0195e17983fc (diff) | |
download | node-new-ef65321083d85be0e33ffaa06e7b71fed49e571c.tar.gz |
node: do not override `message`/`stack` of error
Put the `...^` arrow string to the hidden property of the object, and
use it only when printing error to the stderr.
Fix: https://github.com/nodejs/io.js/issues/2104
PR-URL: https://github.com/nodejs/io.js/pull/2108
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'test/sequential')
-rw-r--r-- | test/sequential/test-vm-syntax-error-stderr.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/sequential/test-vm-syntax-error-stderr.js b/test/sequential/test-vm-syntax-error-stderr.js index f7b1bef9e3..7c3c5ff135 100644 --- a/test/sequential/test-vm-syntax-error-stderr.js +++ b/test/sequential/test-vm-syntax-error-stderr.js @@ -8,17 +8,17 @@ var wrong_script = path.join(common.fixturesDir, 'cert.pem'); var p = child_process.spawn(process.execPath, [ '-e', - 'try { require(process.argv[1]); } catch (e) { console.log(e.stack); }', + 'require(process.argv[1]);', wrong_script ]); -p.stderr.on('data', function(data) { - assert(false, 'Unexpected stderr data: ' + data); +p.stdout.on('data', function(data) { + assert(false, 'Unexpected stdout data: ' + data); }); var output = ''; -p.stdout.on('data', function(data) { +p.stderr.on('data', function(data) { output += data; }); |