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/node-v0.x-archive#7766.

PR: #8723
PR-URL: nodejs/node-v0.x-archive#8723
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 5, 2015
1 parent c8239c0 commit d01a900
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 @@ -475,7 +475,7 @@ Buffer.prototype.fill = function fill(value, start, end) {

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

if (list.length === 0) {
Expand Down

0 comments on commit d01a900

Please sign in to comment.