forked from kidgrow-microservices-platform

克 刘
2020-03-16 549148d90d41a3320bd36d469fd690354c78de58
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
50
51
52
53
54
55
package com.kidgrow.common.exception;
 
import com.kidgrow.common.model.ErrorCode;
 
/**
 * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br>
 *
 * @Description: <br>
 * @Project: <br>
 * @CreateDate: Created in 2020/2/4 14:14 <br>
 * @Author: <a href="4345453@kidgrow.com">liuke</a>
 */
public class KidgrowException extends RuntimeException {
 
    private static final long serialVersionUID = 3655050728585279326L;
 
    private  String msg;
 
    private int code = ErrorCode.ERROR.getCode();
 
    public KidgrowException() {
 
    }
 
    public KidgrowException(Throwable cause) {
        super(cause);
    }
 
    public KidgrowException(String msg) {
        super(msg);
    }
 
    public KidgrowException(int code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }
 
    public KidgrowException(int code, String msg, Throwable cause) {
        super(msg, cause);
        this.code = code;
    }
 
    public int getCode() {
        return code;
    }
 
    public void setCode(int code) {
        this.code = code;
    }
 
    public String getMsg() {return msg;}
 
    public void  setMsg() {this.msg=msg;}
}