lrj
2 天以前 c61d4fe27c97d2ecc907756aa571a4ef14a7b9b6
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.rongyichuang.common.exception;
 
/**
 * 业务异常类
 */
public class BusinessException extends RuntimeException {
 
    private String code;
 
    public BusinessException(String message) {
        super(message);
        this.code = "BUSINESS_ERROR";
    }
 
    public BusinessException(String code, String message) {
        super(message);
        this.code = code;
    }
 
    public BusinessException(String message, Throwable cause) {
        super(message, cause);
        this.code = "BUSINESS_ERROR";
    }
 
    public String getCode() {
        return code;
    }
 
    public void setCode(String code) {
        this.code = code;
    }
}