fs: remove unused catch bindings
PR-URL: https://github.com/nodejs/node/pull/24079 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Wyatt Preul <wpreul@gmail.com>
This commit is contained in:
parent
a49b672aad
commit
9d68e56856
@ -209,7 +209,7 @@ function exists(path, callback) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
fs.access(path, F_OK, suppressedCallback);
|
fs.access(path, F_OK, suppressedCallback);
|
||||||
} catch (err) {
|
} catch {
|
||||||
return callback(false);
|
return callback(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -230,7 +230,7 @@ function existsSync(path) {
|
|||||||
try {
|
try {
|
||||||
path = toPathIfFileURL(path);
|
path = toPathIfFileURL(path);
|
||||||
validatePath(path);
|
validatePath(path);
|
||||||
} catch (e) {
|
} catch {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const ctx = { path };
|
const ctx = { path };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user