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 logging #817

Closed
frankrousseau opened this issue Feb 12, 2015 · 11 comments
Closed

Error logging #817

frankrousseau opened this issue Feb 12, 2015 · 11 comments
Labels
doc Issues and PRs related to the documentations.

Comments

@frankrousseau
Copy link

Hello there,

On Node.js most error loggings are awful (ex: ENOENT error). Most of the time it requires a web research to find its meaning.

Is it possible to improve this in io.js ? I mean, if I don't find any technical constraints, may I propose a pull request about it?

@targos
Copy link
Member

targos commented Feb 12, 2015

There is now doc page about errors that explains these codes

@frankrousseau
Copy link
Author

Could this information be displayed directly in the console (at least in a debug/development mode) ?

@frankrousseau
Copy link
Author

Thank you for the link. It's very helpful.

@targos
Copy link
Member

targos commented Feb 12, 2015

To log the error, you can use the errno module :

npm install errno
node -e "var fs = require('fs'); var codes = require('errno').code; try{ fs.readFileSync('/nosuchfile') } catch(e){ console.log(codes[e.code])  }"

full example here

@frankrousseau
Copy link
Author

It's good but it still requires an additional action. I think it's not very developer friendly.

@Fishrock123
Copy link
Contributor

Kinda a dupe of #92. I think the new error docs should be fine for now?

@Fishrock123 Fishrock123 added the doc Issues and PRs related to the documentations. label Feb 13, 2015
@frankrousseau
Copy link
Author

Thank you @Fishrock123 for the pointer. I would say it looks more like a dup of #212.

@Fishrock123
Copy link
Contributor

Oh yes. That too. Closing in favor of #212 @frankrousseau, please share your thoughts there. :)

@Fishrock123
Copy link
Contributor

Reopening as #212 got closed and this can still improve, imo.

@Fishrock123 Fishrock123 reopened this Feb 13, 2015
@silverwind
Copy link
Contributor

I think this is working as intended.

These are standard POSIX error codes, consult man errno on linux for a list ;)

@Fishrock123
Copy link
Contributor

We got new error docs a while ago. :)

https://iojs.org/api/errors.html

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.
Projects
None yet
Development

No branches or pull requests

4 participants