Skip to content

Commit

Permalink
buffer: reword Buffer.concat error message
Browse files Browse the repository at this point in the history
this brings the error messaging in line with
other node TypeError messages.

fixes nodejs#7766.

PR: nodejs#8723
PR-URL: nodejs#8723
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@users.noreply.github.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
chrisdickinson authored and Julien Gilli committed Mar 3, 2015
1 parent 63fbd10 commit 80259b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ Buffer.isEncoding = function(encoding) {

Buffer.concat = function(list, length) {
if (!util.isArray(list))
throw new TypeError('Usage: Buffer.concat(list[, length])');
throw new TypeError('list argument must be an Array of Buffers.');

if (util.isUndefined(length)) {
length = 0;
Expand Down

0 comments on commit 80259b6

Please sign in to comment.