瀏覽代碼

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<>();