throws 절을 보고합니다.
예:
public void createFile() throws Exception { // 경고: 'throws Exception'은 너무 광범위하고 'IOException' 예외를 숨깁니다
File file = new File("pathToFile");
file.createNewFile();
}
빠른 수정을 적용한 후:
public void createFile() throws IOException {
File file = new File("pathToFile");
file.createNewFile();
}
검사 구성:
throws 절을 무시합니다.