-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Less Obtuse Error Messages #212
Comments
For reference: errno.h I'm not sure whether they're the official messages for the error codes, but "No such file or directory" sounds a lot better than ENOENT, especially to somebody who hasn't touched a language with those error codes. 👍 |
👍 |
However for people that are used to |
linking this to: #92 |
So I'm not super expert at node under the hood, but here's what I found about how this works.
https://github.com/libuv/libuv/blob/v1.x/src/win/fs.c On the windows side these are translated into some sort of unixy error thing here: On the Unix side we appear to just be bubbling up the raw errors. It's unclear to me if node would take seriously the chance to shield all of the low level errors from the average devs and if they did if it would happen at the libuv level or up in actual node-land. /ramblings |
@xjamundx I would imagine the task is to "decorate" well known error codes with some user friendly text, but I'm very much against obfuscating the actual underlying code, and I'd imagine some codes would hit the user raw, without any decoration. To me that's node-land, not libuv. Having said that, I'm actually mildly against the original suggestion: devs should know what they're doing. If they don't understand the error, RTFM. |
+1 for specifying the error code and error message. That way both experts and newcomers know what's up. @algesten I think there is a difference between not knowing what you're doing and not being able to memorize all the error codes. Especially on Windows; many of the error codes seem foreign, because libuv translates them to a UNIX variant. |
Currently, the best place to go to read about the error codes iojs returns is |
+1 about having more explicit error messages. Current error logging makes debugging slower. The new io.js documentation about error codes is a big step forward. But I think it should be included with the error output. Info: I'm ready to code if needed. |
Closing this issue because the error messages for |
Wait @piscisaureus you fixed this? Just based on my issue? Seriously, that's amazing! |
These APIs will be redesigned and added into the master branch after our main PR lands there. See nodejs/abi-stable-node#204 to see progress on the redesigned APIs.
These APIs will be redesigned and added into the master branch after our main PR lands there. See nodejs/abi-stable-node#204 to see progress on the redesigned APIs.
I was hoping we could change this to something awesome like "File not found './notfound'". In fact, I have a hunch there are a lot of obscure error messages that might be made into something a bit more user friendly. If you'd like me to take a serious stab at cataloging these I can, but I have a hunch this is enough to start the discussion.
Thanks ;-)
The text was updated successfully, but these errors were encountered: