Browse Source

child_process: improve maxBuffer error message

Mention what buffer (stdout, stderr) overflowed.
v0.9.1-release
Tom Hughes-Croucher 14 years ago
committed by Ben Noordhuis
parent
commit
c05f52c254
  1. 4
      lib/child_process.js

4
lib/child_process.js

@ -574,7 +574,7 @@ 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();
}
});
@ -582,7 +582,7 @@ exports.execFile = function(file /* args, options, callback */) {
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();
}
});

Loading…
Cancel
Save