From c05f52c254a070f8b58f12b37687d4e40a0edb8e Mon Sep 17 00:00:00 2001 From: Tom Hughes-Croucher Date: Thu, 14 Apr 2011 16:56:09 -0700 Subject: [PATCH] child_process: improve maxBuffer error message Mention what buffer (stdout, stderr) overflowed. --- lib/child_process.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/child_process.js b/lib/child_process.js index 34edbc25ad0..972f68ce277 100644 --- a/lib/child_process.js +++ b/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(); } });