Przeglądaj źródła

modify error message

sunyj 8 lat temu
rodzic
commit
c49ab4079f

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

@@ -115,7 +115,7 @@ public class FileServiceImpl implements FileService {
 					try {
 						ZipUtils.unzip(file.getBytes(), getMasterPath(userName));
 					} catch (IOException e) {
-						throw new IllegalStateException("文件解压失败\n" + ExceptionUtils.getDetailedMessage(e));
+						throw new IllegalStateException("文件解压失败", e);
 					}
 				}
 			}).start();
@@ -204,7 +204,7 @@ public class FileServiceImpl implements FileService {
 			return ZipUtils.zipFolder(getMasterPath(specialProperties.getStandardMaster()) + "/" + userName,
 					FileServiceImpl.fileFilter);
 		} catch (Throwable e) {
-			throw new IOException("压缩失败\n" + ExceptionUtils.getDetailedMessage(e));
+			throw new IOException("压缩失败", e);
 		}
 	}
 
@@ -229,7 +229,7 @@ public class FileServiceImpl implements FileService {
 			byte[] data = ZipUtils.zipFolder(masterPath, FileServiceImpl.fileFilter);
 			download(data, new File(masterPath).getName() + ".zip", response);
 		} catch (Throwable e) {
-			throw new IOException("压缩失败\n" + ExceptionUtils.getDetailedMessage(e));
+			throw new IOException("压缩失败", e);
 		}
 	}