-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Conversation
6892ad4
to
ac2480e
Compare
2947759
to
13fc791
Compare
doc/api/errors.md
Outdated
@@ -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 |
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.
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.)
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.
- for the period I've added it
- I think
not defined
will be closer to the error thrown which will beReferenceError: z is not defined
.
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.
(The period isn't showing up in the GitHub interface. Do you need to push or force-push to your origin maybe?)
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.
Sorry for that, It's now here.
13fc791
to
802fa22
Compare
802fa22
to
3adf94b
Compare
Seems fast-trackable. If you are a Collaborator and you agree, 👍 here! |
Landed in a7a8714 |
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>
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>
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>
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>
Not defined is not identical to undefined
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes