Prevent mistake, when mean to use try-finally
in try-catch
.
try {
try {
doSomeThing()
} catch { // <- Typo, should be finally
// Clean up
}
} catch {
// Handle error
}
try {
try {
doSomeThing()
} finally {
// Clean up
}
} catch {
// Handle error
}
I was thinking proposal this to no-useless-catch
at first, but in this case the catch
block not actually "useless", since it could mean to catch error thrown by inner catch
block.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too