diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2017-06-16 23:38:58 +0200 |
---|---|---|
committer | Refael Ackermann <refack@gmail.com> | 2017-06-22 13:54:53 -0400 |
commit | 3e178848a5f5f128f38b0ede5ab73210194c8aa6 (patch) | |
tree | b80176d9838143fd5dc52e2912c5c10ba22e27b5 /test/parallel/test-util-inherits.js | |
parent | 2a46e57d139a93caaff4dc63000e61b9a27669bb (diff) | |
download | android-node-v8-3e178848a5f5f128f38b0ede5ab73210194c8aa6.tar.gz android-node-v8-3e178848a5f5f128f38b0ede5ab73210194c8aa6.tar.bz2 android-node-v8-3e178848a5f5f128f38b0ede5ab73210194c8aa6.zip |
errors: improve ERR_INVALID_ARG_TYPE
The error message might be misleading if an object property
was the issue and not the argument itself.
Fix this by checking if a argument or a property is passed
to the handler function.
PR-URL: https://github.com/nodejs/node/pull/13730
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'test/parallel/test-util-inherits.js')
-rw-r--r-- | test/parallel/test-util-inherits.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-util-inherits.js b/test/parallel/test-util-inherits.js index 2cfd543ac9..31b7e6ad3d 100644 --- a/test/parallel/test-util-inherits.js +++ b/test/parallel/test-util-inherits.js @@ -85,7 +85,7 @@ assert.throws(function() { }, common.expectsError({ code: 'ERR_INVALID_ARG_TYPE', type: TypeError, - message: 'The "superCtor.prototype" argument must be of type function' + message: 'The "superCtor.prototype" property must be of type function' }) ); assert.throws(function() { |