Skip to content
Critiq Docs

Search docs

Search documentation pages and rules

correctness.exceptions

Do not use empty catch blocks

Catch blocks should handle or rethrow exceptions.

#Metadata

Rule ID
java.correctness.empty-catch
Severity
medium
Confidence
0.88
Languages
java
Presets
strict
Stability
stable
Applies to
block
Tags
correctness, java, rules-catalog

#Why it matters

Empty catches hide failures and make debugging difficult.

#Remediation

Log, recover, or rethrow the exception with context.

#Repository path

The generated metadata points to critiq-rules/libs/rules/catalog/rules/java/java.correctness.empty-catch.rule.yaml.