Empty 'catch' block
Reports empty catch
blocks. While occasionally intended, empty catch
blocks can make debugging extremely difficult.
Example:
try {
throw new Exception()
}
catch (Exception e) {
}
After the quick-fix is applied:
try {
throw new Exception()
}
catch (Exception ignored) {
}
Inspection options
Option | Type | Default |
---|---|---|
Comments count as content | Checkbox | true |
Ignore when catch parameter is named ignore or ignored | Checkbox | true |
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Groovy, 233.SNAPSHOT |
Last modified: 13 July 2023