init
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
package com.ruoyi.common.exception;
|
||||
|
||||
|
||||
public interface IErrorService {
|
||||
Integer getCode();
|
||||
String getText();
|
||||
}
|
||||
@@ -40,6 +40,11 @@ public final class ServiceException extends RuntimeException {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public ServiceException(IErrorService errorService) {
|
||||
this.message = errorService.getText();
|
||||
this.code = errorService.getCode();
|
||||
}
|
||||
|
||||
public String getDetailMessage() {
|
||||
return detailMessage;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user