From 0414ddb0b2b3a7199ae6181a770f97ac140dbd73 Mon Sep 17 00:00:00 2001 From: zhangf <1603559716@qq.com> Date: 星期三, 08 五月 2024 16:46:22 +0800 Subject: [PATCH] spi统计 --- goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/excepiton/TargetDutyException.java | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/excepiton/TargetDutyException.java b/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/excepiton/TargetDutyException.java index 4968b0a..7d41240 100644 --- a/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/excepiton/TargetDutyException.java +++ b/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/excepiton/TargetDutyException.java @@ -1,6 +1,7 @@ package com.gkhy.safePlatform.targetDuty.excepiton; +import com.gkhy.safePlatform.commons.enums.ResultCodes; import com.gkhy.safePlatform.targetDuty.enums.TargetDutyResultCodes; public class TargetDutyException extends RuntimeException { @@ -13,12 +14,23 @@ this.message = error.getDesc(); } + public TargetDutyException(String message) { + super(message); + this.code = "A3000"; + } + public TargetDutyException(String code, String message) { super(message); this.code = code; this.message = message; } + public TargetDutyException(ResultCodes clientParamIllegal) { + super(clientParamIllegal.getDesc()); + this.code = clientParamIllegal.getCode(); + this.message = clientParamIllegal.getDesc(); + } + public String getCode() { return this.code; } -- Gitblit v1.9.2