joyent/node — Issue #1905: mismatch between ENOENT in require('constants') and UV ENOENT
Author: shtylman
Created: 2011-10-18 02:50:17+00:00
State: open

I am not sure about the other error codes, but the value used in require('constants') for ENOENT is showing up as '2'. However, when I do a stat on a non existent file/folder, the errno is actually 32. This value corresponds to the UV_ENOENT enum value but not the ENOENT system value.

Some questions:
1) Is there a reason the UV ENOENT value is set to something different than the system value?
2) is require constants deprecated? How else would one be able to examine the error codes?
3) If it is not deprecated, should it be updated to use the UV constants vs the system ones?