请求方法修改

pull/2/head
perry 2023-05-10 10:07:43 +08:00
parent 975a9a087c
commit b815ee0374
1 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,6 @@
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 lombok.Data;
import lombok.EqualsAndHashCode;
@ -32,7 +33,10 @@ public final class ServiceException extends RuntimeException {
this.code = errorCode.getCode();
this.message = errorCode.getMsg();
}
public ServiceException( String message) {
this.code = GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode();
this.message = message;
}
public ServiceException(Integer code, String message) {
this.code = code;
this.message = message;