Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2a3a66a

Browse filesBrowse files
AyushG3112jasnell
authored andcommitted
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: #19908 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 17deb5f commit 2a3a66a
Copy full SHA for 2a3a66a

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎lib/internal/errors.js‎

Copy file name to clipboardExpand all lines: lib/internal/errors.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -959,8 +959,8 @@ E('ERR_VM_MODULE_STATUS', 'Module status %s', Error);
959959
E('ERR_ZLIB_INITIALIZATION_FAILED', 'Initialization failed', Error);
960960

961961
function invalidArgType(name, expected, actual) {
962-
internalAssert(typeof name === 'string');
963-
internalAssert(arguments.length === 3);
962+
internalAssert(arguments.length === 3, 'Exactly 3 arguments are required');
963+
internalAssert(typeof name === 'string', 'name must be a string');
964964

965965
// determiner: 'must be' or 'must not be'
966966
let determiner;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.