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);
result = new ExcelImportServer().importExcelByIs(in, pojoClass, params).getList();
} catch (Exception e) {
LOGGER.error(e.getMessage(),e.fillInStackTrace());
LOGGER.error(e.getMessage(),e);
} finally {
try {
in.close();
} catch (IOException e) {
LOGGER.error(e.getMessage(),e.fillInStackTrace());
LOGGER.error(e.getMessage(),e);
}
}
return result;
@@ -96,12 +96,12 @@ public class ExcelImportUtil {
in = new FileInputStream(file);
return new ExcelImportServer().importExcelByIs(in, pojoClass, params);
} catch (Exception e) {
LOGGER.error(e.getMessage(),e.fillInStackTrace());
LOGGER.error(e.getMessage(),e);
} finally {
try {
in.close();
} catch (IOException e) {
LOGGER.error(e.getMessage(),e.fillInStackTrace());
LOGGER.error(e.getMessage(),e);
}
}
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) {
e.printStackTrace();
logger.error(e.getMessage(), e.fillInStackTrace());
logger.error(e.getMessage(),e);
throw new ExcelExportException(ExcelExportEnum.EXPORT_ERROR, e.getCause());
}
}
@@ -220,7 +220,7 @@ public class ExcelExportServer extends ExcelExportBase {
} catch (Exception e) {
e.printStackTrace();
logger.error(e.getMessage(), e.fillInStackTrace());
logger.error(e.getMessage(),e);
throw new ExcelExportException(ExcelExportEnum.EXPORT_ERROR, e.getCause());
}
}


Loading…
Cancel
Save