diff --git a/ruoyi/src/main/java/com/ruoyi/project/tool/gen/service/GenTableServiceImpl.java b/ruoyi/src/main/java/com/ruoyi/project/tool/gen/service/GenTableServiceImpl.java index bd551ada9..b10c54946 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/tool/gen/service/GenTableServiceImpl.java +++ b/ruoyi/src/main/java/com/ruoyi/project/tool/gen/service/GenTableServiceImpl.java @@ -144,9 +144,9 @@ public class GenTableServiceImpl implements IGenTableService public void importGenTable(List tableList) { String operName = SecurityUtils.getUsername(); - for (GenTable table : tableList) + try { - try + for (GenTable table : tableList) { String tableName = table.getTableName(); GenUtils.initTable(table, operName); @@ -162,10 +162,10 @@ public class GenTableServiceImpl implements IGenTableService } } } - catch (Exception e) - { - log.error("表名 " + table.getTableName() + " 导入失败:", e); - } + } + catch (Exception e) + { + throw new CustomException("导入失败:" + e.getMessage()); } }