fs: throw fs.access errors in JS#17160
Conversation
|
The plan is to first migrate the fs errors into JS land, then migrate them to cc @jasnell |
588a6ad to
4d0a61c
Compare
|
Test failed on Windows because
|
4d0a61c to
f8bc6f9
Compare
|
CI looks green. |
|
This should be semver-major due to the error code changes of "path" type check cc @nodejs/tsc although we already have two TSC approvals |
lib/internal/errors.js
Outdated
There was a problem hiding this comment.
Also @fhinkel does this still LGTY with the stringFromPath changes for fixing Windows?
src/node_file.cc
Outdated
There was a problem hiding this comment.
Nit: Could we change this to two Checks? If one of them fails it's easier to see what fails.
- Migrate the type check of path to ERR_INVALID_ARG_TYPE - Add template counterparts of ASYNC_CALL, ASYNC_DEST_CALL, SYNC_CALL, SYNC_DEST_CALL - Port StringFromPath and UVException to JavaScript - Migrate the access binding to collect the error context in C++, then throw the error in JS
f8bc6f9 to
51d8dac
Compare
|
Split the checks as suggested by @fhinkel . CI: https://ci.nodejs.org/job/node-test-pull-request/11701/ |
- Migrate the type check of path to ERR_INVALID_ARG_TYPE - Add template counterparts of ASYNC_CALL, ASYNC_DEST_CALL, SYNC_CALL, SYNC_DEST_CALL - Port StringFromPath and UVException to JavaScript - Migrate the access binding to collect the error context in C++, then throw the error in JS PR-URL: #17160 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
|
Landed in 07d3409, thanks! |
SYNC_CALL, SYNC_DEST_CALL
then throw the error in JS
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
fs, errors