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