feat: 新增全局处理自定义服务警告

This commit is contained in:
insistence
2024-07-11 16:47:23 +08:00
parent 0dfc201990
commit 47d5697653
2 changed files with 17 additions and 1 deletions

View File

@@ -38,6 +38,16 @@ class ServiceException(Exception):
self.message = message
class ServiceWarning(Exception):
"""
自定义服务警告ServiceWarning
"""
def __init__(self, data: str = None, message: str = None):
self.data = data
self.message = message
class ModelValidatorException(Exception):
"""
自定义模型校验异常ModelValidatorException