Back to Intellij Community

GroovyEmptyCatchBlock

plugins/groovy/groovy-psi/resources/inspectionDescriptions/GroovyEmptyCatchBlock.html

2025.3-rc-2302 B
Original Source

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) {
}