Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
child_process: improve maxBuffer error message
Browse files Browse the repository at this point in the history
Mention what buffer (stdout, stderr) overflowed.
  • Loading branch information
sh1mmer authored and bnoordhuis committed Jul 28, 2012
1 parent 20e12e4 commit c05f52c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/child_process.js
Expand Up @@ -574,15 +574,15 @@ exports.execFile = function(file /* args, options, callback */) {
child.stdout.addListener('data', function(chunk) {
stdout += chunk;
if (stdout.length > options.maxBuffer) {
err = new Error('maxBuffer exceeded.');
err = new Error('stdout maxBuffer exceeded.');
kill();
}
});

child.stderr.addListener('data', function(chunk) {
stderr += chunk;
if (stderr.length > options.maxBuffer) {
err = new Error('maxBuffer exceeded.');
err = new Error('stderr maxBuffer exceeded.');
kill();
}
});
Expand Down

0 comments on commit c05f52c

Please sign in to comment.