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:
parent
d4653d5a7d
commit
1ddcccb7e3
14
lib/net.js
14
lib/net.js
@ -64,8 +64,8 @@ const {
|
||||
onStreamRead,
|
||||
kUpdateTimer
|
||||
} = require('internal/stream_base_commons');
|
||||
const errors = require('internal/errors');
|
||||
const {
|
||||
codes: {
|
||||
ERR_INVALID_ADDRESS_FAMILY,
|
||||
ERR_INVALID_ARG_TYPE,
|
||||
ERR_INVALID_ARG_VALUE,
|
||||
@ -76,7 +76,11 @@ const {
|
||||
ERR_SERVER_NOT_RUNNING,
|
||||
ERR_SOCKET_BAD_PORT,
|
||||
ERR_SOCKET_CLOSED
|
||||
} = errors.codes;
|
||||
},
|
||||
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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user