Skip to content

Commit da3325d

Browse files
authored
chore: remove unused exceptions in try catch blocks (#4440)
1 parent 9f7fafe commit da3325d

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

build/wasm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ if (process.argv[2] === '--docker') {
6969
}
7070

7171
const hasApk = (function () {
72-
try { execSync('command -v apk'); return true } catch (error) { return false }
72+
try { execSync('command -v apk'); return true } catch { return false }
7373
})()
7474
const hasOptimizer = (function () {
75-
try { execSync(`${WASM_OPT} --version`); return true } catch (error) { return false }
75+
try { execSync(`${WASM_OPT} --version`); return true } catch { return false }
7676
})()
7777
if (hasApk) {
7878
// Gather information about the tools used for the build

docs/examples/snapshot-testing.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ async function basicSnapshotExample () {
9292
const { unlink } = require('node:fs/promises')
9393
await unlink(snapshotPath)
9494
console.log('\n🗑️ Cleaned up temporary snapshot file')
95-
} catch (error) {
95+
} catch {
9696
// File might not exist or already be deleted
9797
}
9898
}

lib/dispatcher/client-h1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function lazyllhttp () {
6666
let mod
6767
try {
6868
mod = new WebAssembly.Module(require('../llhttp/llhttp_simd-wasm.js'))
69-
} catch (e) {
69+
} catch {
7070
/* istanbul ignore next */
7171

7272
// We could check if the error was caused by the simd option not

0 commit comments

Comments
 (0)