请求方法修改
parent
975a9a087c
commit
b815ee0374
|
@ -1,5 +1,6 @@
|
||||||
package cn.iocoder.yudao.framework.common.exception;
|
package cn.iocoder.yudao.framework.common.exception;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants;
|
||||||
import cn.iocoder.yudao.framework.common.exception.enums.ServiceErrorCodeRange;
|
import cn.iocoder.yudao.framework.common.exception.enums.ServiceErrorCodeRange;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
@ -32,7 +33,10 @@ public final class ServiceException extends RuntimeException {
|
||||||
this.code = errorCode.getCode();
|
this.code = errorCode.getCode();
|
||||||
this.message = errorCode.getMsg();
|
this.message = errorCode.getMsg();
|
||||||
}
|
}
|
||||||
|
public ServiceException( String message) {
|
||||||
|
this.code = GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode();
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
public ServiceException(Integer code, String message) {
|
public ServiceException(Integer code, String message) {
|
||||||
this.code = code;
|
this.code = code;
|
||||||
this.message = message;
|
this.message = message;
|
||||||
|
|
Loading…
Reference in New Issue