mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
update 新增支持占位符格式的 ServiceException 构造方法
- 新增 ServiceException(String message, Object... args) 构造器,内部使用 Hutool StrFormatter.format 格式化消息 - 解决日志打印和异常抛出信息格式不统一的问题,统一使用 {} 占位符 - 优化异常消息书写,简化拼接,提升代码可读性和维护性
This commit is contained in:
@ -128,7 +128,7 @@ public class FlwDefinitionServiceImpl implements IFlwDefinitionService {
|
||||
}
|
||||
}
|
||||
if (CollUtil.isNotEmpty(errorMsg)) {
|
||||
throw new ServiceException("节点【" + StringUtils.join(errorMsg, ",") + "】未配置办理人!");
|
||||
throw new ServiceException("节点【{}】未配置办理人!", String.join(",", errorMsg));
|
||||
}
|
||||
}
|
||||
return defService.publish(id);
|
||||
@ -188,7 +188,7 @@ public class FlwDefinitionServiceImpl implements IFlwDefinitionService {
|
||||
if (CollUtil.isNotEmpty(flowDefinitions)) {
|
||||
String join = StreamUtils.join(flowDefinitions, FlowDefinition::getFlowCode);
|
||||
log.info("流程定义【{}】已被使用不可被删除!", join);
|
||||
throw new ServiceException("流程定义【" + join + "】已被使用不可被删除!");
|
||||
throw new ServiceException("流程定义【{}】已被使用不可被删除!", join);
|
||||
}
|
||||
}
|
||||
try {
|
||||
|
Reference in New Issue
Block a user