Skip to content

Commit d01a900

Browse files
chrisdickinsonJulien Gilli
authored andcommitted
buffer: reword Buffer.concat error message
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>
1 parent c8239c0 commit d01a900

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/buffer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ Buffer.prototype.fill = function fill(value, start, end) {
475475

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

481481
if (list.length === 0) {

0 commit comments

Comments
 (0)