summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAyush Gupta <AyushG3112@gmail.com>2018-04-10 13:10:57 +0530
committerRuben Bridgewater <ruben@bridgewater.de>2018-04-12 15:31:01 +0200
commitbb6de0d4a844959fddd00e28d190d3d3ccbef8c9 (patch)
treec3ce9562af47320a9fc61daba739d8a55b6d70c6 /lib
parent0e811173b1b5ddb94b6ed43735f2e33ab980e627 (diff)
downloadandroid-node-v8-bb6de0d4a844959fddd00e28d190d3d3ccbef8c9.tar.gz
android-node-v8-bb6de0d4a844959fddd00e28d190d3d3ccbef8c9.tar.bz2
android-node-v8-bb6de0d4a844959fddd00e28d190d3d3ccbef8c9.zip
errors: pass missing `message` parameter to `internalAssert`
Passes the `message` parameter to `internalAssert` when `ERR_INVALID_ARG_TYPE` is thrown with invalid arguments. PR-URL: https://github.com/nodejs/node/pull/19908 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/internal/errors.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/internal/errors.js b/lib/internal/errors.js
index 99ffb46783..b190ae32bf 100644
--- a/lib/internal/errors.js
+++ b/lib/internal/errors.js
@@ -959,8 +959,8 @@ E('ERR_VM_MODULE_STATUS', 'Module status %s', Error);
E('ERR_ZLIB_INITIALIZATION_FAILED', 'Initialization failed', Error);
function invalidArgType(name, expected, actual) {
- internalAssert(typeof name === 'string');
- internalAssert(arguments.length === 3);
+ internalAssert(arguments.length === 3, 'Exactly 3 arguments are required');
+ internalAssert(typeof name === 'string', 'name must be a string');
// determiner: 'must be' or 'must not be'
let determiner;