parent
b40a765165
commit
53c2193cd7
@ -0,0 +1,30 @@
|
||||
package com.mashibing.common.exception;
|
||||
|
||||
import com.mashibing.common.enums.ExceptionEnums;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author heqijun
|
||||
* @ClassName: StrategyException
|
||||
* @Description: 策略模块自定义异常
|
||||
* @date 2025/6/10 13:57
|
||||
*/
|
||||
|
||||
@Getter
|
||||
public class StrategyException extends RuntimeException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final Integer code;
|
||||
|
||||
public StrategyException(Integer code, String message) {
|
||||
super(message);
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public StrategyException(ExceptionEnums exceptionEnums) {
|
||||
super(exceptionEnums.getMsg());
|
||||
this.code = exceptionEnums.getCode();
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in new issue