Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2020-02-18 20:14:50 +0300
committerJames M Snell <jasnell@gmail.com>2020-03-05 22:52:53 +0300
commitb023d61716ddc9cd97cc148bb8d237ec8d894d2b (patch)
treeb4bd2099b7f4142b10019798d3a8e70c0d8abe21 /lib/internal/errors.js
parent9ec87815027ddf6782ab930975b86333a61ed554 (diff)
lib: move isLegalPort to validators, refactor
isLegalPort was used multiple places in the same way -- to validate the port and throw if necessary. Moved into internal/validators. PR-URL: https://github.com/nodejs/node/pull/31851 Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Diffstat (limited to 'lib/internal/errors.js')
-rw-r--r--lib/internal/errors.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/internal/errors.js b/lib/internal/errors.js
index be7385644b0..9f9a0a66f28 100644
--- a/lib/internal/errors.js
+++ b/lib/internal/errors.js
@@ -1282,7 +1282,7 @@ E('ERR_SOCKET_ALREADY_BOUND', 'Socket is already bound', Error);
E('ERR_SOCKET_BAD_BUFFER_SIZE',
'Buffer size must be a positive integer', TypeError);
E('ERR_SOCKET_BAD_PORT',
- 'Port should be >= 0 and < 65536. Received %s.', RangeError);
+ '%s should be >= 0 and < 65536. Received %s.', RangeError);
E('ERR_SOCKET_BAD_TYPE',
'Bad socket type specified. Valid types are: udp4, udp6', TypeError);
E('ERR_SOCKET_BUFFER_SIZE',