| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2a46e57 commit 3e17884
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -192,7 +192,8 @@ E('ERR_V8BREAKITERATOR', 'full ICU data not installed. ' + | |||
| 192 | 192 | function invalidArgType(name, expected, actual) { | |
| 193 | 193 | const assert = lazyAssert(); | |
| 194 | 194 | assert(name, 'name is required'); | |
| 195 | - var msg = `The "${name}" argument must be ${oneOf(expected, 'type')}`; | ||
| 195 | + const type = name.includes('.') ? 'property' : 'argument'; | ||
| 196 | + var msg = `The "${name}" ${type} must be ${oneOf(expected, 'type')}`; | ||
| 196 | 197 | if (arguments.length >= 3) { | |
| 197 | 198 | msg += `. Received type ${actual !== null ? typeof actual : 'null'}`; | |
| 198 | 199 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,13 +34,13 @@ for (let i = 0; i < 10; i++) { | |||
| 34 | 34 | const invalidUserArgument = common.expectsError({ | |
| 35 | 35 | code: 'ERR_INVALID_ARG_TYPE', | |
| 36 | 36 | type: TypeError, | |
| 37 | - message: 'The "preValue.user" argument must be of type Number' | ||
| 37 | + message: 'The "preValue.user" property must be of type Number' | ||
| 38 | 38 | }); | |
| 39 | 39 | ||
| 40 | 40 | const invalidSystemArgument = common.expectsError({ | |
| 41 | 41 | code: 'ERR_INVALID_ARG_TYPE', | |
| 42 | 42 | type: TypeError, | |
| 43 | - message: 'The "preValue.system" argument must be of type Number' | ||
| 43 | + message: 'The "preValue.system" property must be of type Number' | ||
| 44 | 44 | }); | |
| 45 | 45 | ||
| 46 | 46 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -85,7 +85,7 @@ assert.throws(function() { | |||
| 85 | 85 | }, common.expectsError({ | |
| 86 | 86 | code: 'ERR_INVALID_ARG_TYPE', | |
| 87 | 87 | type: TypeError, | |
| 88 | - message: 'The "superCtor.prototype" argument must be of type function' | ||
| 88 | + message: 'The "superCtor.prototype" property must be of type function' | ||
| 89 | 89 | }) | |
| 90 | 90 | ); | |
| 91 | 91 | assert.throws(function() { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments