opt:任务更新失败添加备注说明

This commit is contained in:
zhangzq
2025-02-02 12:08:51 +08:00
parent 51f9f6b3c8
commit ae2bc86877

View File

@@ -11,6 +11,7 @@ import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.utils.MapOf;
import org.nl.common.utils.SecurityUtils;
import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.wql.WQL;
@@ -139,8 +140,6 @@ public class TaskServiceImpl implements TaskService {
} else {
// 任务处理类
String processing_class = taskObj.getString("handle_class");
String message = "";
try {
Object obj = new Object();
try {
@@ -172,15 +171,12 @@ public class TaskServiceImpl implements TaskService {
param.put("remark", "操作成功");
wo.update(param);
}
} catch (InvocationTargetException e) {
if (ObjectUtil.isNull(e.getTargetException().getMessage())) {
message = e.getTargetException().toString();
} else {
message = e.getTargetException().getMessage();
} catch (Exception e) {
StringBuffer exinfo = new StringBuffer();
for (int i1 = 0; i1 < Math.min(e.getStackTrace().length,15); i1++) {
exinfo.append(e.getStackTrace()[i1].toString());
}
throw new BadRequestException(message);
} catch (Exception e) {
e.printStackTrace();
log.error(task_id+"手动更新任务失败:{}", exinfo);
throw new BadRequestException(e.getMessage());
}
}