diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2019-04-02 03:46:17 +0200 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2019-04-04 12:51:03 +0200 |
commit | 3b044962c48fe313905877a96b5d0894a5404f6f (patch) | |
tree | f88086693fd685477a88b5cbc5c7442f25a49986 /lib/inspector.js | |
parent | a9bf6652b5353f2098d4c0cd0eb77d17e02e164d (diff) | |
download | node-new-3b044962c48fe313905877a96b5d0894a5404f6f.tar.gz |
errors: add more information in case of invalid callbacks
This adds the actual callback that is passed through to the error
message in case an ERR_INVALID_CALLBACK error is thrown.
PR-URL: https://github.com/nodejs/node/pull/27048
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Diffstat (limited to 'lib/inspector.js')
-rw-r--r-- | lib/inspector.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/inspector.js b/lib/inspector.js index 793e63ff39..33c48125bb 100644 --- a/lib/inspector.js +++ b/lib/inspector.js @@ -78,7 +78,7 @@ class Session extends EventEmitter { throw new ERR_INVALID_ARG_TYPE('params', 'Object', params); } if (callback && typeof callback !== 'function') { - throw new ERR_INVALID_CALLBACK(); + throw new ERR_INVALID_CALLBACK(callback); } if (!this[connectionSymbol]) { |