diff options
author | Weijia Wang <381152119@qq.com> | 2017-12-13 20:48:43 +0800 |
---|---|---|
committer | Weijia Wang <381152119@qq.com> | 2017-12-24 14:09:29 +0800 |
commit | d022cb1bdd20f10483cbe988a950548df2dfd48c (patch) | |
tree | e10d1a2c2d4957ef123a8aaadb9727bf674c00ae /lib/internal/timers.js | |
parent | 4d74b52979c60391bc369be69a34463eba61f383 (diff) | |
download | node-new-d022cb1bdd20f10483cbe988a950548df2dfd48c.tar.gz |
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>
Diffstat (limited to 'lib/internal/timers.js')
-rw-r--r-- | lib/internal/timers.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/internal/timers.js b/lib/internal/timers.js index e4fbc6e0a3..e541622021 100644 --- a/lib/internal/timers.js +++ b/lib/internal/timers.js @@ -115,7 +115,7 @@ function validateTimerDuration(msecs) { } if (msecs < 0 || !isFinite(msecs)) { - throw new errors.RangeError('ERR_VALUE_OUT_OF_RANGE', 'msecs', + throw new errors.RangeError('ERR_OUT_OF_RANGE', 'msecs', 'a non-negative finite number', msecs); } |