소스 검색

don't return the path if the file doesn't exist

sunyj 8 년 전
부모
커밋
e94575e41c
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      report/src/main/java/com/uas/report/service/impl/FileServiceImpl.java

+ 2 - 1
report/src/main/java/com/uas/report/service/impl/FileServiceImpl.java

@@ -426,7 +426,8 @@ public class FileServiceImpl implements FileService {
 		filePath = getAbsolutePath(filePath, isAbsolutePath);
 		File file = new File(filePath);
 		if (!file.exists()) {
-			throw new FileNotFoundException("文件不存在:" + filePath);
+			logger.error("文件不存在:" + filePath);
+			throw new FileNotFoundException("文件不存在");
 		}
 
 		List<Map<String, Object>> result = new ArrayList<>();