fs: two minor optimizations
- If the function in tryStatSync threw, it would never reach that code path to return any value.
- Only use try catch if necessary. lchmodSync does not need the second try catch in most cases.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines
Affected core subsystem(s)
fs