-
Notifications
You must be signed in to change notification settings - Fork 29k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src: rename ERR_STRING_TOO_LARGE to ERR_STRING_TOO_LONG #19864
Conversation
The old error name and message were trying to be consistent with ERR_BUFFER_TOO_LARGE but they were not really accurate. The kStringMaxLength was measured in number of characters, not number of bytes. The name ERR_STRING_TOO_LARGE also seems a bit awkward. This patch tries to correct them before they get released to users.
CI: https://ci.nodejs.org/job/node-test-pull-request/14117/ cc @jasnell @addaleax @devsnek who previously signed off #19739 |
Another try...: https://ci.nodejs.org/job/node-test-pull-request/14124/ |
<a id="ERR_STRING_TOO_LARGE"></a> | ||
### ERR_STRING_TOO_LARGE | ||
<a id="ERR_STRING_TOO_LONG"></a> | ||
### ERR_STRING_TOO_LONG | ||
|
||
An attempt has been made to create a string larger than the maximum allowed | ||
size. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
“longer than the maximum allowed length”?
The old error name and message were trying to be consistent with ERR_BUFFER_TOO_LARGE but they were not really accurate. The kStringMaxLength was measured in number of characters, not number of bytes. The name ERR_STRING_TOO_LARGE also seems a bit awkward. This patch tries to correct them before they get released to users. PR-URL: nodejs#19864 Refs: nodejs#19739 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Landed in 3626944 🎉 While landing I also added the suggestion from @TimothyGu |
The old error name and message were trying to be consistent with
ERR_BUFFER_TOO_LARGE but they were not really accurate.
The kStringMaxLength was measured in number of characters,
not number of bytes. The name ERR_STRING_TOO_LARGE also
seems a bit awkward. This patch tries to correct them before
they get released to users.
Refs: #19739
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes