This commit is contained in:
张良(004796)
2024-03-25 19:13:06 +08:00
parent 0e46e316bb
commit 8a89c53258
25 changed files with 468 additions and 15 deletions

View File

@@ -0,0 +1,7 @@
package com.ruoyi.common.exception;
public interface IErrorService {
Integer getCode();
String getText();
}

View File

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