Forráskód Böngészése

simplify jrxml compilation error message

sunyj 8 éve
szülő
commit
9e0bec445c

+ 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;
 	}