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
|
| 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;
| }
| }
|
|