Reports a catch clause that catches an inappropriate exception.

Some exceptions, for example java.lang.NullPointerException or java.lang.IllegalMonitorStateException, represent programming errors and therefore almost certainly should not be caught in production code.

Example:


  try {
    return component.getMousePosition(true) != null;
  }
  catch (NullPointerException e) { // warning: Prohibited exception 'NullPointerException' caught
    return false;
  }

Use the Prohibited exceptions list to specify which exceptions should be reported.