mirror of
https://github.com/nodejs/node.git
synced 2025-08-16 06:08:50 +02:00
lib: combine similar error codes
There two similar error codes in lib: "ERR_VALUE_OUT_OF_RANGE" and "ERR_OUT_OF_RANGE". This change is to reduce them into "ERR_VALUE_OUT_OF_RANGE" Fixes: https://github.com/nodejs/node/issues/17603 PR-URL: https://github.com/nodejs/node/pull/17648 Fixes: https://github.com/nodejs/node/issues/17603 Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
parent
4d74b52979
commit
d022cb1bdd
17 changed files with 70 additions and 42 deletions
|
@ -281,8 +281,18 @@ assert.strictEqual(
|
|||
);
|
||||
|
||||
assert.strictEqual(
|
||||
errors.message('ERR_VALUE_OUT_OF_RANGE', ['A', 'some values', 'B']),
|
||||
'The value of "A" must be some values. Received "B"'
|
||||
errors.message('ERR_OUT_OF_RANGE', ['A']),
|
||||
'The value of "A" is out of range.'
|
||||
);
|
||||
|
||||
assert.strictEqual(
|
||||
errors.message('ERR_OUT_OF_RANGE', ['A', 'some values']),
|
||||
'The value of "A" is out of range. It must be some values.'
|
||||
);
|
||||
|
||||
assert.strictEqual(
|
||||
errors.message('ERR_OUT_OF_RANGE', ['A', 'some values', 'B']),
|
||||
'The value of "A" is out of range. It must be some values. Received B'
|
||||
);
|
||||
|
||||
assert.strictEqual(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue