2021与蓝度共同重构项目,服务端
chenjiantian
2021-11-24 6bdb5dda11b8723ddc20a37b9cbcc1e1fdace13a
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
/**
 * Copyright (C) 2018-2020
 * All rights reserved, Designed By www.yixiang.co
 * 注意:
 * 本软件为www.yixiang.co开发研制
 */
package com.sandu.common.execption;
 
import com.sandu.common.enums.ResponseStatusEnums;
import lombok.Getter;
 
/**
 * 统一异常处理
 *
 * @author chenjiantian
 */
@Getter
public class BusinessException extends RuntimeException {
 
    private Integer code = ResponseStatusEnums.FAIL.getCode();
    private Object data;
 
    public BusinessException(String msg) {
        super(msg);
    }
 
    public BusinessException(Integer code, String msg) {
        super(msg);
        this.code = code;
    }
 
    public BusinessException(Integer code, String msg, Object data) {
        super(msg);
        this.code = code;
        this.data = data;
    }
}