diff options
author | matzavinos <matzavinos@workable.com> | 2017-08-12 00:02:15 +0300 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2017-10-15 11:48:38 +0800 |
commit | 7f55349079705a9e1d43024ed45c1351907f3d8e (patch) | |
tree | fc3d93337c8158a50a9aed188497c099b8f3266e /lib/dns.js | |
parent | 2b76b5d8dd14b57eaad15b4082cc007296b4d630 (diff) | |
download | android-node-v8-7f55349079705a9e1d43024ed45c1351907f3d8e.tar.gz android-node-v8-7f55349079705a9e1d43024ed45c1351907f3d8e.tar.bz2 android-node-v8-7f55349079705a9e1d43024ed45c1351907f3d8e.zip |
net: convert to using internal/errors
Covert lib/net.js over to using lib/internal/errors.js
- Replace thrown errors in lib/net.js
with errors from lib/internal/errors.
The ERR_INVALID_OPT_VALUE error have been used
in the Server.prototype.listen() method
- Update tests according to the above modifications
PR-URL: https://github.com/nodejs/node/pull/14782
Refs: https://github.com/nodejs/node/issues/11273
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'lib/dns.js')
-rw-r--r-- | lib/dns.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dns.js b/lib/dns.js index e536f1b4f9..581310b132 100644 --- a/lib/dns.js +++ b/lib/dns.js @@ -216,7 +216,7 @@ function lookupService(host, port, callback) { throw new errors.TypeError('ERR_INVALID_OPT_VALUE', 'host', host); if (!isLegalPort(port)) - throw new errors.RangeError('ERR_SOCKET_BAD_PORT'); + throw new errors.RangeError('ERR_SOCKET_BAD_PORT', port); if (typeof callback !== 'function') throw new errors.TypeError('ERR_INVALID_CALLBACK'); |