提交 b0425448 authored 作者: zjm's avatar zjm

fix(PDF模块): 自行处理异常

自行处理异常
上级 84577cd3
...@@ -135,9 +135,8 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -135,9 +135,8 @@ public class JavaToPdfHtmlFreeMarker {
Long endTime = System.currentTimeMillis(); Long endTime = System.currentTimeMillis();
System.out.print("Itext parse Html to Pdf End -> " + (endTime - startTime)); System.out.print("Itext parse Html to Pdf End -> " + (endTime - startTime));
return new FileRet(name, pdfPath, preview +folderName+ name); return new FileRet(name, pdfPath, preview +folderName+ name);
} catch (IOException | DocumentException | com.lowagie.text.DocumentException e) { } catch (IOException | com.lowagie.text.DocumentException | DocumentException e) {
log.error("[file] {}", e); log.error("[PDf] 生成pdf未找到地址:{}",pdfPath);
e.printStackTrace();
} finally { } finally {
document.close(); document.close();
} }
...@@ -180,9 +179,9 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -180,9 +179,9 @@ public class JavaToPdfHtmlFreeMarker {
Long endTime = System.currentTimeMillis(); Long endTime = System.currentTimeMillis();
System.out.print("Itext parse Html to Pdf End -> " + (endTime - startTime)); System.out.print("Itext parse Html to Pdf End -> " + (endTime - startTime));
return new FileRet(name, pdfPath, preview +folderName+ name); return new FileRet(name, pdfPath, preview +folderName+ name);
} catch (IOException | DocumentException | com.lowagie.text.DocumentException e) { } catch (Exception e) {
log.error("[file] {}", e); log.error("[PDf] 生成pdf未找到地址:{}",pdfPath);
e.printStackTrace(); // e.printStackTrace();
} finally { } finally {
document.close(); document.close();
} }
...@@ -223,7 +222,7 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -223,7 +222,7 @@ public class JavaToPdfHtmlFreeMarker {
} }
return strings; return strings;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); log.error("[freeMarkerRender] 方法找不到地址:{}",htmlPath);
} finally { } finally {
try { try {
out.close(); out.close();
...@@ -476,7 +475,7 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -476,7 +475,7 @@ public class JavaToPdfHtmlFreeMarker {
} }
return listCont; return listCont;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); log.error("[freeMarkerRenderList] 方法找不到地址:{}",htmlPath);
} finally { } finally {
try { try {
out.close(); out.close();
...@@ -646,7 +645,7 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -646,7 +645,7 @@ public class JavaToPdfHtmlFreeMarker {
} }
return strings; return strings;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); log.error("[freeMarkerRenderConfirm] 方法找不到地址:{}",htmlPath);
} finally { } finally {
try { try {
out.close(); out.close();
...@@ -969,7 +968,7 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -969,7 +968,7 @@ public class JavaToPdfHtmlFreeMarker {
} }
return strings; return strings;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); log.error("[freeMarkerRenderVerification2] 方法找不到地址:{}",htmlPath);
} finally { } finally {
try { try {
out.close(); out.close();
...@@ -1594,7 +1593,7 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -1594,7 +1593,7 @@ public class JavaToPdfHtmlFreeMarker {
} }
return strings; return strings;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); log.error("[freeMarkerRenderRevenue] 方法找不到地址:{}",htmlPath);
} finally { } finally {
try { try {
out.close(); out.close();
...@@ -1776,7 +1775,7 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -1776,7 +1775,7 @@ public class JavaToPdfHtmlFreeMarker {
} }
return strings; return strings;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); log.error("[freeMarkerRenderExportDevice] 方法找不到地址:{}",htmlPath);
} finally { } finally {
try { try {
out.close(); out.close();
...@@ -2158,7 +2157,7 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -2158,7 +2157,7 @@ public class JavaToPdfHtmlFreeMarker {
} }
return strings; return strings;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); log.error("[freeMarkerRenderWorkHandover2] 方法找不到地址:{}",htmlPath);
} finally { } finally {
try { try {
out.close(); out.close();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论