summaryrefslogtreecommitdiff
path: root/lib/dgram.js
diff options
context:
space:
mode:
authormatzavinos <matzavinos@workable.com>2017-08-12 00:02:15 +0300
committerJoyee Cheung <joyeec9h3@gmail.com>2017-10-15 11:48:38 +0800
commit7f55349079705a9e1d43024ed45c1351907f3d8e (patch)
treefc3d93337c8158a50a9aed188497c099b8f3266e /lib/dgram.js
parent2b76b5d8dd14b57eaad15b4082cc007296b4d630 (diff)
downloadandroid-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/dgram.js')
-rw-r--r--lib/dgram.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dgram.js b/lib/dgram.js
index f33e872e64..38b182e3e7 100644
--- a/lib/dgram.js
+++ b/lib/dgram.js
@@ -417,7 +417,7 @@ Socket.prototype.send = function(buffer,
port = port >>> 0;
if (port === 0 || port > 65535)
- throw new errors.RangeError('ERR_SOCKET_BAD_PORT');
+ throw new errors.RangeError('ERR_SOCKET_BAD_PORT', port);
// Normalize callback so it's either a function or undefined but not anything
// else.