Skip to content
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

Error alphabetization fixes #15307

Closed
wants to merge 2 commits into from
Closed

Conversation

maclover7
Copy link
Contributor

@maclover7 maclover7 commented Sep 10, 2017

A few things going on here:

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

errors, test

@nodejs-github-bot nodejs-github-bot added the errors Issues and PRs related to JavaScript errors originated in Node.js core. label Sep 10, 2017
@apapirovski
Copy link
Member

apapirovski commented Sep 10, 2017

Was just looking at this too. I think, ideally, the doc at doc/api/errors.md also needs to be updated since it has two references to ERR_VALUE_OUT_OF_RANGE.

Copy link
Contributor

@MylesBorins MylesBorins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MylesBorins
Copy link
Contributor

We should likely swap the order of these two commits to avoid having a commit with a broken test suite... this would break git bisect

Also fixes error being (now!) properly thrown by alphabetize-errors.
Was not using proper magic comment syntax before!
@maclover7
Copy link
Contributor Author

@MylesBorins swapped commit order

E('ERR_V8BREAKITERATOR', 'Full ICU data not installed. ' +
'See https://github.com/nodejs/node/wiki/Intl');
E('ERR_VALID_PERFORMANCE_ENTRY_TYPE',
'At least one valid performance entry type is required');
E('ERR_VALUE_OUT_OF_RANGE', 'The value of "%s" must be %s. Received "%s"');
E('ERR_VALUE_OUT_OF_RANGE', (start, end, value) => {
return `The value of "${start}" must be ${end}. Received "${value}"`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable names are misleading. The first parameter is the name of the value and the second is a description of the set of permitted values, so they don't actually depict a [start, end] range. Could you change the names while you are at it?

@BridgeAR
Copy link
Member

@maclover7 this needs a rebase.

@jasnell
Copy link
Member

jasnell commented Sep 14, 2017

Rebased on landing.

jasnell pushed a commit that referenced this pull request Sep 14, 2017
Also fixes error being (now!) properly thrown by alphabetize-errors.

also properly enable lint rule

Was not using proper magic comment syntax before!

-URL: #15307
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell
Copy link
Member

jasnell commented Sep 14, 2017

Landed in e9358af

@jasnell jasnell closed this Sep 14, 2017
@maclover7 maclover7 deleted the jm-lint-enable branch September 14, 2017 23:37
addaleax pushed a commit to addaleax/ayo that referenced this pull request Sep 17, 2017
Also fixes error being (now!) properly thrown by alphabetize-errors.

also properly enable lint rule

Was not using proper magic comment syntax before!

-URL: nodejs/node#15307
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell
Copy link
Member

jasnell commented Sep 20, 2017

This would need to be backported for v8.x

Qard pushed a commit to Qard/ayo that referenced this pull request Sep 21, 2017
Also fixes error being (now!) properly thrown by alphabetize-errors.

also properly enable lint rule

Was not using proper magic comment syntax before!

-URL: nodejs/node#15307
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
jasnell pushed a commit that referenced this pull request Sep 25, 2017
Also fixes error being (now!) properly thrown by alphabetize-errors.

also properly enable lint rule

Was not using proper magic comment syntax before!

-URL: #15307
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins
Copy link
Contributor

@refack can you please include this in the backport of #15083

MylesBorins pushed a commit that referenced this pull request Oct 3, 2017
Also fixes error being (now!) properly thrown by alphabetize-errors.

also properly enable lint rule

Was not using proper magic comment syntax before!

-URL: #15307
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
errors Issues and PRs related to JavaScript errors originated in Node.js core.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants