mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2024-12-22 20:54:26 +08:00
refactor: 自定义异常类名修改
This commit is contained in:
parent
c1a9c0c5cb
commit
41e89fb3d7
@ -10,24 +10,24 @@ import lombok.Getter;
|
|||||||
* @date 2022/7/31
|
* @date 2022/7/31
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
public class ApiException extends RuntimeException {
|
public class BizException extends RuntimeException {
|
||||||
|
|
||||||
public IResultCode resultCode;
|
public IResultCode resultCode;
|
||||||
|
|
||||||
public ApiException(IResultCode errorCode) {
|
public BizException(IResultCode errorCode) {
|
||||||
super(errorCode.getMsg());
|
super(errorCode.getMsg());
|
||||||
this.resultCode = errorCode;
|
this.resultCode = errorCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ApiException(String message){
|
public BizException(String message){
|
||||||
super(message);
|
super(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ApiException(String message, Throwable cause){
|
public BizException(String message, Throwable cause){
|
||||||
super(message, cause);
|
super(message, cause);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ApiException(Throwable cause){
|
public BizException(Throwable cause){
|
||||||
super(cause);
|
super(cause);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user