diff options
author | Mayhem <stepien.nicolas@gmail.com> | 2015-03-24 15:15:57 +0100 |
---|---|---|
committer | Brendan Ashworth <brendan.ashworth@me.com> | 2015-03-24 12:42:15 -0700 |
commit | 1832743e181149c16ccd3752247f4306d3aa0fe1 (patch) | |
tree | 936fa7014782d993aef319599602ecd61c704788 /lib/child_process.js | |
parent | 7dd5e824be53e222af63cc86e89b7ab7f841901c (diff) | |
download | node-new-1832743e181149c16ccd3752247f4306d3aa0fe1.tar.gz |
lib: add missing `new` for errors lib/*.js
Not including `new` adds a useless frame and removes a potentially
useful frame.
PR-URL: https://github.com/iojs/io.js/pull/1246
Reviewed-By: Petka Antonov <petka_antonov@hotmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Diffstat (limited to 'lib/child_process.js')
-rw-r--r-- | lib/child_process.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/child_process.js b/lib/child_process.js index 5fcd260394..a38de2867d 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -860,9 +860,9 @@ function _validateStdio(stdio, sync) { // Cleanup previously created pipes cleanup(); if (!sync) - throw Error('Child process can have only one IPC pipe'); + throw new Error('Child process can have only one IPC pipe'); else - throw Error('You cannot use IPC with synchronous forks'); + throw new Error('You cannot use IPC with synchronous forks'); } ipc = createPipe(true); |