|
@@ -10,13 +10,24 @@ import lombok.Data;
|
|
|
public class BusinessException extends RuntimeException {
|
|
|
private int code;
|
|
|
private String message;
|
|
|
+ private Object data;
|
|
|
|
|
|
public BusinessException(Integer code, String msg){
|
|
|
this.code = code;
|
|
|
this.message = msg;
|
|
|
}
|
|
|
+ public BusinessException(Integer code, String msg,Object data){
|
|
|
+ this.code = code;
|
|
|
+ this.message = msg;
|
|
|
+ this.data = data;
|
|
|
+ }
|
|
|
public BusinessException(ResultCode errorCode) {
|
|
|
this.code = errorCode.code;
|
|
|
this.message = errorCode.msg;
|
|
|
}
|
|
|
+ public BusinessException(ResultCode errorCode,Object data){
|
|
|
+ this.code = errorCode.code;
|
|
|
+ this.message = errorCode.msg;
|
|
|
+ this.data = data;
|
|
|
+ }
|
|
|
}
|