summaryrefslogtreecommitdiff
path: root/lib/fs.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2022-02-02 21:57:11 -0800
committerNode.js GitHub Bot <github-bot@iojs.org>2022-02-05 12:58:30 +0000
commit78a2cd862426fbc137f9286b7bcedf415f960ef0 (patch)
treec21b3e2a79da88748e820a41c3327890e3e89012 /lib/fs.js
parentee8c2bed8bcc13b44ccfca07dd94b773b3bc943d (diff)
downloadnode-new-78a2cd862426fbc137f9286b7bcedf415f960ef0.tar.gz
lib: add comments to empty catch statements
PR-URL: https://github.com/nodejs/node/pull/41831 Refs: https://eslint.org/docs/rules/no-empty Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Diffstat (limited to 'lib/fs.js')
-rw-r--r--lib/fs.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/fs.js b/lib/fs.js
index 3f99d6b7b7..0e2bbbcc63 100644
--- a/lib/fs.js
+++ b/lib/fs.js
@@ -1600,7 +1600,9 @@ function symlink(target, path, type_, callback_) {
// errors consistent between platforms if invalid path is
// provided.
absoluteTarget = pathModule.resolve(path, '..', target);
- } catch { }
+ } catch {
+ // Continue regardless of error.
+ }
if (absoluteTarget !== undefined) {
stat(absoluteTarget, (err, stat) => {
const resolvedType = !err && stat.isDirectory() ? 'dir' : 'file';