buffer: reword Buffer.concat error message
this brings the error messaging in line with other node TypeError messages. Fixes: https://github.com/joyent/node/issues/7766 PR-URL: https://github.com/joyent/node/pull/8723 Reviewed-By: James M Snell <jasnell@users.noreply.github.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
abd3ecfbd1
commit
31421afe89
@ -170,7 +170,7 @@ Buffer.isEncoding = function(encoding) {
|
||||
|
||||
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 (length === undefined) {
|
||||
length = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user