fs: simplify the error context collection in C++, migrate fs.close errors by joyeecheung · Pull Request #17338 · nodejs/node
added
c++
labels
joyeecheung
changed the title
fs: simply the error context collection in C++, migrate fs.close errors
fs: simplify the error context collection in C++, migrate fs.close errors
joyeecheung
added
fs
labels
addaleax
added
the
author ready
label
BridgeAR
removed
the
author ready
label
joyeecheung added a commit that referenced this pull request
Add a errno -> [error code, uv error message] map to the uv binding so the error message can be assembled in the JS layer. PR-URL: #17338 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
joyeecheung added a commit that referenced this pull request
- Simplify the SyncCall template function, only collect error number and syscall in the C++ layer and collect the rest of context in JS for flexibility. - Remove the stringFromPath JS helper now that the unprefixed path is directly put into the context before the binding is invoked with the prefixed path. - Validate more properties in fs.access tests. PR-URL: #17338 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
joyeecheung added a commit that referenced this pull request
* Collect the error context in both JS and C++, then throw the error in JS * Test that the errors thrown from fs.close and fs.closeSync includes the correct error code, error number and syscall properties PR-URL: #17338 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
joyeecheung added a commit to joyeecheung/node that referenced this pull request
Add a errno -> [error code, uv error message] map to the uv binding so the error message can be assembled in the JS layer. PR-URL: nodejs#17338 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins pushed a commit that referenced this pull request
MylesBorins pushed a commit that referenced this pull request
joyeecheung added a commit to joyeecheung/node that referenced this pull request
Add a errno -> [error code, uv error message] map to the uv binding so the error message can be assembled in the JS layer. PR-URL: nodejs#17338 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins pushed a commit that referenced this pull request
MylesBorins pushed a commit that referenced this pull request
rvagg pushed a commit that referenced this pull request