Skip to content

Commit d8f7338

Browse files
committed
fs: throw errors on invalid paths synchronously
- Throw getPathFromURL() and nullCheck() errors synchronously instead of deferring them to the next tick, since we already throw validatePath() errors synchronously. - Merge nullCheck() into validatePath() - Never throws in `fs.exists()`, instead, invoke the callback with false, or emit a warning when the callback is not a function. This is to bring it inline with fs.existsSync(), which never throws. - Updates the comment of rethrow() - Throw ERR_INVALID_ARG_VALUE for null checks PR-URL: #18308 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent b505716 commit d8f7338

File tree

7 files changed

+252
-334
lines changed

7 files changed

+252
-334
lines changed

0 commit comments

Comments
 (0)