Browse Source

修改异常捕获的日志处理

4.1.3.A
jueyue 10 years ago
parent
commit
c4f6df0645
2 changed files with 6 additions and 6 deletions
  1. +4
    -4
      easypoi-base/src/main/java/org/jeecgframework/poi/excel/ExcelImportUtil.java
  2. +2
    -2
      easypoi-base/src/main/java/org/jeecgframework/poi/excel/export/ExcelExportServer.java

+ 4
- 4
easypoi-base/src/main/java/org/jeecgframework/poi/excel/ExcelImportUtil.java View File

@@ -40,12 +40,12 @@ public class ExcelImportUtil {
in = new FileInputStream(file); in = new FileInputStream(file);
result = new ExcelImportServer().importExcelByIs(in, pojoClass, params).getList(); result = new ExcelImportServer().importExcelByIs(in, pojoClass, params).getList();
} catch (Exception e) { } catch (Exception e) {
LOGGER.error(e.getMessage(),e.fillInStackTrace());
LOGGER.error(e.getMessage(),e);
} finally { } finally {
try { try {
in.close(); in.close();
} catch (IOException e) { } catch (IOException e) {
LOGGER.error(e.getMessage(),e.fillInStackTrace());
LOGGER.error(e.getMessage(),e);
} }
} }
return result; return result;
@@ -96,12 +96,12 @@ public class ExcelImportUtil {
in = new FileInputStream(file); in = new FileInputStream(file);
return new ExcelImportServer().importExcelByIs(in, pojoClass, params); return new ExcelImportServer().importExcelByIs(in, pojoClass, params);
} catch (Exception e) { } catch (Exception e) {
LOGGER.error(e.getMessage(),e.fillInStackTrace());
LOGGER.error(e.getMessage(),e);
} finally { } finally {
try { try {
in.close(); in.close();
} catch (IOException e) { } catch (IOException e) {
LOGGER.error(e.getMessage(),e.fillInStackTrace());
LOGGER.error(e.getMessage(),e);
} }
} }
return null; return null;


+ 2
- 2
easypoi-base/src/main/java/org/jeecgframework/poi/excel/export/ExcelExportServer.java View File

@@ -151,7 +151,7 @@ public class ExcelExportServer extends ExcelExportBase {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
logger.error(e.getMessage(), e.fillInStackTrace());
logger.error(e.getMessage(),e);
throw new ExcelExportException(ExcelExportEnum.EXPORT_ERROR, e.getCause()); throw new ExcelExportException(ExcelExportEnum.EXPORT_ERROR, e.getCause());
} }
} }
@@ -220,7 +220,7 @@ public class ExcelExportServer extends ExcelExportBase {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
logger.error(e.getMessage(), e.fillInStackTrace());
logger.error(e.getMessage(),e);
throw new ExcelExportException(ExcelExportEnum.EXPORT_ERROR, e.getCause()); throw new ExcelExportException(ExcelExportEnum.EXPORT_ERROR, e.getCause());
} }
} }


Loading…
Cancel
Save