Reports a throws clause with an exception that is more generic than the exception that the method actually throws.

Example:


  public void createFile() throws Exception { // warning: 'throws Exception' is too broad, masking exception 'IOException'
    File file = new File("pathToFile");
    file.createNewFile();
  }

After the quick-fix is applied:


  public void createFile() throws IOException {
    File file = new File("pathToFile");
    file.createNewFile();

Configure the inspection: