Commit 3e736972 authored by suhuiguang's avatar suhuiguang

1.企业注册提示bug

parent 3a790b61
...@@ -265,9 +265,12 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI ...@@ -265,9 +265,12 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
} catch (Exception rollbackException) { } catch (Exception rollbackException) {
logger.error("回滚操作发生异常: {}", rollbackException.getMessage(), rollbackException); logger.error("回滚操作发生异常: {}", rollbackException.getMessage(), rollbackException);
} }
assert e instanceof BadRequest; if(e instanceof BadRequest){
String err = (((BadRequest) e).getErrorCode().equals("BadRequest")) ? "企业注册失败:" + e.getMessage() : "企业注册失败,请联系管理员!" ; String err = "企业注册失败:" + e.getMessage();
throw new RuntimeException(err); throw new BadRequest(err);
} else {
throw new BadRequest("企业注册失败,请联系管理员!");
}
} }
return model; return model;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment