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