소스 검색

simplify jrxml compilation error message

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

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

@@ -140,7 +140,7 @@ public class PrintServiceImpl implements PrintService {
 			connection = dataSource.getConnection();
 			String jasperFilePath = maybeCompileJrxmlFile(jrxmlFilePath, false, otherParameters, connection, dataSource.getDbType());
 			if(StringUtils.isEmpty(jasperFilePath)){
-				throw new IllegalStateException("编译报表模板失败: " + jrxmlFilePath);
+				throw new IllegalStateException("编译报表模板失败");
 			}
 
 			Map<String, Object> result = new HashMap<>();
@@ -263,7 +263,7 @@ public class PrintServiceImpl implements PrintService {
 				compileReportToFile(jrxmlFilePath, isSub, jasperFilePath, otherParameters, connection, dbType);
 			}
 		} catch (JRException e) {
-			throw new IllegalStateException("编译报表模板失败: " + jrxmlFilePath, e);
+			throw new IllegalStateException("编译报表模板失败: " + jrxmlFile.getName(), e);
 		}
 		return jasperFilePath;
 	}