PB.AECB
Avoid "catch" blocks with empty bodies
Description
This rule flags any "catch" block that has an empty body.
It is always a good idea to insert error handling code inside of each "catch" block.
Example
package PB;
public class AECB {
public void openFile (String s) {
try {
} catch (Exception e) {
// nothing is done for this exception.
}
}
}
Repair
Add exception handling code inside of the "catch" block.
|