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

Change error message to not defined #26857

Closed
wants to merge 1 commit into from

Conversation

MohammedEssehemy
Copy link
Contributor

@MohammedEssehemy MohammedEssehemy commented Mar 22, 2019

Not defined is not identical to undefined

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. errors Issues and PRs related to JavaScript errors originated in Node.js core. labels Mar 22, 2019
@@ -35,7 +35,7 @@ are handled using the [`try…catch` construct][try-catch] provided by the
JavaScript language.

```js
// Throws with a ReferenceError because z is undefined
// Throws with a ReferenceError because z is not defined
Copy link
Member

Choose a reason for hiding this comment

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

This is fine as it's an improvement over what's there, but two totally insignificant suggestions to consider:

  • Put a period at the end of the comment as it's a full sentence.
  • Maybe instead of "not defined", it should be "undeclared" or even "non-existent"? Those are the terms I see used in the MDN article on ReferenceError, so might as well steal from them. (I looked in the spec too but I don't think the language there would be helpful here, at least not as far as I saw.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Trott

  • for the period I've added it
  • I think not defined will be closer to the error thrown which will be ReferenceError: z is not defined.

Copy link
Member

Choose a reason for hiding this comment

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

(The period isn't showing up in the GitHub interface. Do you need to push or force-push to your origin maybe?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry for that, It's now here.

@Trott
Copy link
Member

Trott commented Mar 22, 2019

Seems fast-trackable. If you are a Collaborator and you agree, 👍 here!

@Trott Trott added the fast-track PRs that do not need to wait for 48 hours to land. label Mar 22, 2019
@vsemozhetbyt vsemozhetbyt added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 22, 2019
@Trott
Copy link
Member

Trott commented Mar 22, 2019

@vsemozhetbyt
Copy link
Contributor

Landed in a7a8714
Thank you!

pull bot pushed a commit to zys-contrib/node that referenced this pull request Mar 23, 2019
PR-URL: nodejs#26857
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
targos pushed a commit to targos/node that referenced this pull request Mar 27, 2019
PR-URL: nodejs#26857
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
targos pushed a commit that referenced this pull request Mar 27, 2019
PR-URL: #26857
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
BethGriggs pushed a commit that referenced this pull request Apr 17, 2019
PR-URL: #26857
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
@BethGriggs BethGriggs mentioned this pull request May 1, 2019
MylesBorins pushed a commit that referenced this pull request May 16, 2019
PR-URL: #26857
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. doc Issues and PRs related to the documentations. errors Issues and PRs related to JavaScript errors originated in Node.js core. fast-track PRs that do not need to wait for 48 hours to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants