From a74b4a062fd6cf8ba5fb0a17078f855b072841cd Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sun, 4 Nov 2018 10:25:02 -0500 Subject: test: remove unused catch bindings PR-URL: https://github.com/nodejs/node/pull/24079 Reviewed-By: Sam Roberts Reviewed-By: Wyatt Preul --- test/common/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/common/index.js') diff --git a/test/common/index.js b/test/common/index.js index 768570437a..da5027af13 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -372,7 +372,7 @@ function canCreateSymLink() { try { const output = execSync(`${whoamiPath} /priv`, { timout: 1000 }); return output.includes('SeCreateSymbolicLinkPrivilege'); - } catch (e) { + } catch { return false; } } @@ -456,7 +456,7 @@ function isAlive(pid) { try { process.kill(pid, 'SIGCONT'); return true; - } catch (e) { + } catch { return false; } } @@ -665,7 +665,7 @@ function getTTYfd() { if (ttyFd === undefined) { try { return fs.openSync('/dev/tty'); - } catch (e) { + } catch { // There aren't any tty fd's available to use. return -1; } @@ -679,7 +679,7 @@ function runWithInvalidFD(func) { // be an valid one. try { while (fs.fstatSync(fd--) && fd > 0); - } catch (e) { + } catch { return func(fd); } -- cgit v1.2.3