Example

public static class ClassA throws NullPointerException {
public void methodA {

throw new NullPointerException();
}

Solution
Create a dedicated catch clause for each exception that is declared in the throws clause.

public static class ClassA throws Error {
public void methodA {

throw new Error();
}