mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
lib: gather all errors constant in the same place for consistency
PR-URL: https://github.com/nodejs/node/pull/24038 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
1 parent
01e8a3a8d5
commit
bc5a0d3c05
1 file changed
+16
-18
+16
-18
@@ -64,19 +64,23 @@ const {
|
||||
onStreamRead,
|
||||
kUpdateTimer
|
||||
} = require('internal/stream_base_commons');
|
||||
const errors = require('internal/errors');
|
||||
const {
|
||||
ERR_INVALID_ADDRESS_FAMILY,
|
||||
ERR_INVALID_ARG_TYPE,
|
||||
ERR_INVALID_ARG_VALUE,
|
||||
ERR_INVALID_FD_TYPE,
|
||||
ERR_INVALID_IP_ADDRESS,
|
||||
ERR_INVALID_OPT_VALUE,
|
||||
ERR_SERVER_ALREADY_LISTEN,
|
||||
ERR_SERVER_NOT_RUNNING,
|
||||
ERR_SOCKET_BAD_PORT,
|
||||
ERR_SOCKET_CLOSED
|
||||
} = errors.codes;
|
||||
codes: {
|
||||
ERR_INVALID_ADDRESS_FAMILY,
|
||||
ERR_INVALID_ARG_TYPE,
|
||||
ERR_INVALID_ARG_VALUE,
|
||||
ERR_INVALID_FD_TYPE,
|
||||
ERR_INVALID_IP_ADDRESS,
|
||||
ERR_INVALID_OPT_VALUE,
|
||||
ERR_SERVER_ALREADY_LISTEN,
|
||||
ERR_SERVER_NOT_RUNNING,
|
||||
ERR_SOCKET_BAD_PORT,
|
||||
ERR_SOCKET_CLOSED
|
||||
},
|
||||
errnoException,
|
||||
exceptionWithHostPort,
|
||||
uvExceptionWithHostPort
|
||||
} = require('internal/errors');
|
||||
const { validateInt32, validateString } = require('internal/validators');
|
||||
const kLastWriteQueueSize = Symbol('lastWriteQueueSize');
|
||||
|
||||
@@ -84,12 +88,6 @@ const kLastWriteQueueSize = Symbol('lastWriteQueueSize');
|
||||
let cluster;
|
||||
let dns;
|
||||
|
||||
const {
|
||||
errnoException,
|
||||
exceptionWithHostPort,
|
||||
uvExceptionWithHostPort
|
||||
} = errors;
|
||||
|
||||
const {
|
||||
kTimeout,
|
||||
setUnrefTimeout,
|
||||
|
||||
Reference in new issue
Block a user