diff options
Diffstat (limited to 'lib/dns.js')
-rw-r--r-- | lib/dns.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/dns.js b/lib/dns.js index 3d057d6b50..f9c724e7b6 100644 --- a/lib/dns.js +++ b/lib/dns.js @@ -98,7 +98,7 @@ function lookup(hostname, options, callback) { callback = options; family = 0; } else if (typeof callback !== 'function') { - throw new ERR_INVALID_CALLBACK(); + throw new ERR_INVALID_CALLBACK(callback); } else if (options !== null && typeof options === 'object') { hints = options.hints >>> 0; family = options.family >>> 0; @@ -174,7 +174,7 @@ function lookupService(hostname, port, callback) { throw new ERR_SOCKET_BAD_PORT(port); if (typeof callback !== 'function') - throw new ERR_INVALID_CALLBACK(); + throw new ERR_INVALID_CALLBACK(callback); port = +port; @@ -213,7 +213,7 @@ function resolver(bindingName) { validateString(name, 'name'); if (typeof callback !== 'function') { - throw new ERR_INVALID_CALLBACK(); + throw new ERR_INVALID_CALLBACK(callback); } const req = new QueryReqWrap(); |