songhuangfeng123
2022-09-08 bfb4c1e1d4e3f99f74a51ef5b67531f9d91d0dde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
 
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 {
    private String code;
    private String message;
 
    public TargetDutyException(TargetDutyResultCodes error) {
        super(error.getDesc());
        this.code = error.getCode();
        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;
    }
 
    public void setCode(String code) {
        this.code = code;
    }
 
    public String getMessage() {
        return this.message;
    }
 
    public void setMessage(String message) {
        this.message = message;
    }
}