- Version: 8.0.0-rc.0
- Platform: Windows 7 x64
- Subsystem: errors, fs, libuv, process
Currently, most of the ENOENT error messages have a similar signature:
Error: ENOENT: no such file or directory, [call] '/full/path/to/filename'
For example:
fs.accessSync('does-not-exist'); // etc...
Error: ENOENT: no such file or directory, access '...does-not-exist'
Error: ENOENT: no such file or directory, chmod '...does-not-exist'
Error: ENOENT: no such file or directory, link '...does-not-exist' -> '...does-not-exist2'
Error: ENOENT: no such file or directory, lstat '...does-not-exist'
Error: ENOENT: no such file or directory, open '...does-not-exist'
Error: ENOENT: no such file or directory, readlink '...does-not-exist'
Error: ENOENT: no such file or directory, rename '...does-not-exist' -> '...does-not-exist2'
Error: ENOENT: no such file or directory, rmdir '...does-not-exist'
Error: ENOENT: no such file or directory, scandir '...does-not-exist'
Error: ENOENT: no such file or directory, stat '...does-not-exist'
Error: ENOENT: no such file or directory, unlink '...does-not-exist'
Error: ENOENT: no such file or directory, utime '...does-not-exist'
I've stumbled upon 2 cases that have different and somehow confusing signatures:
- Different order, no description, filename without quotes, no full path:
fs.watch('does-not-exist');
// Error: watch does-not-exist ENOENT
- No file name / path at all (the call name can be wrongly considered as the file name):
process.chdir('does-not-exist');
// Error: ENOENT: no such file or directory, uv_chdir
Are these cases worth unification? Can they be addressed in Node.js or they are libuv features?
Currently, most of the ENOENT error messages have a similar signature:
Error: ENOENT: no such file or directory, [call] '/full/path/to/filename'For example:
I've stumbled upon 2 cases that have different and somehow confusing signatures:
Are these cases worth unification? Can they be addressed in Node.js or they are libuv features?