summaryrefslogtreecommitdiff
path: root/lib/internal/fs.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/internal/fs.js')
-rw-r--r--lib/internal/fs.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/internal/fs.js b/lib/internal/fs.js
index 36155d4d67..21ab1048d7 100644
--- a/lib/internal/fs.js
+++ b/lib/internal/fs.js
@@ -323,7 +323,8 @@ function toUnixTimestamp(time, name = 'time') {
function validateBuffer(buffer) {
if (!isUint8Array(buffer)) {
- const err = new ERR_INVALID_ARG_TYPE('buffer', ['Buffer', 'Uint8Array']);
+ const err = new ERR_INVALID_ARG_TYPE('buffer',
+ ['Buffer', 'Uint8Array'], buffer);
Error.captureStackTrace(err, validateBuffer);
throw err;
}
@@ -379,7 +380,7 @@ function validatePath(path, propName) {
}
if (typeof path !== 'string' && !isUint8Array(path)) {
- err = new ERR_INVALID_ARG_TYPE(propName, ['string', 'Buffer', 'URL']);
+ err = new ERR_INVALID_ARG_TYPE(propName, ['string', 'Buffer', 'URL'], path);
} else {
err = nullCheck(path, propName, false);
}