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

doc: correct description of System Error errno property #6665

Closed
wants to merge 1 commit into from

Conversation

pabigot
Copy link
Contributor

@pabigot pabigot commented May 10, 2016

Checklist
  • tests and code linting passes
  • documentation is changed or added
  • the commit message follows commit guidelines
Affected core subsystem(s)

doc

Description of change

Fix issue #6649

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label May 10, 2016
@evanlucas
Copy link
Contributor

Thanks Peter

/cc @nodejs/documentation

@estliberitas
Copy link
Contributor

estliberitas commented May 10, 2016

Should we not consider errors created via util._errnoException() as System Errors? Have a look, please:
https://github.com/nodejs/node/search?l=javascript&q=_errnoException&type=Code

The potential problem is that util._errnoException() assigns same value to code and errno:
https://github.com/nodejs/node/blob/master/lib/util.js#L950

And if in some cases errors created by this function will be considered as System Errors, users will assume errno is an integer while it may happen to be a string.

LGTM except the question.

@pabigot
Copy link
Contributor Author

pabigot commented May 10, 2016

@estliberitas Good point.

From my perspective what util_errnoException() is doing is wrong, probably the origin of the inconsistent documentation, and very likely hard to fix as the integer value is discarded long before it's invoked.

@jasnell
Copy link
Member

jasnell commented May 10, 2016

Also consider that this is likely going to change a bit following #6573. The code property will be expanded to include node's own errors, there will not be a corresponding errno property with those, and the code values will not be prefixed with E. Perhaps we should wait on landing this one until that one is a bit more settled?

@pabigot
Copy link
Contributor Author

pabigot commented May 10, 2016

@jasnell I'm fine with waiting. It's clear there's no simple description that covers what Node.js currently does.

I'm less fine with changing the string representation stored in code from the POSIX standard names like EBUSY in cases where the error corresponds to a POSIX error value, but that's something I'll raise in #6573 if it really bugs me.

@jasnell
Copy link
Member

jasnell commented May 17, 2016

#6573 won't change any of the POSIX standard error names, it just introduces new error codes for things that currently don't have them.

pabigot referenced this pull request in raszi/node-tmp Jun 30, 2016
@rvagg rvagg force-pushed the master branch 2 times, most recently from c133999 to 83c7a88 Compare October 18, 2016 17:01
@jasnell jasnell added the stalled Issues and PRs that are stalled. label Jan 6, 2017
@jasnell
Copy link
Member

jasnell commented Mar 1, 2017

Closing given the lack of forward progress on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. stalled Issues and PRs that are stalled.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants