refactor: 自定义异常类名修改

This commit is contained in:
haoxr 2022-12-21 23:43:36 +08:00
parent c1a9c0c5cb
commit 41e89fb3d7

View File

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