2024-01-26 09:57:55 +08:00
|
|
|
class LoginException(Exception):
|
|
|
|
|
"""
|
|
|
|
|
自定义登录异常LoginException
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def __init__(self, data: str = None, message: str = None):
|
|
|
|
|
self.data = data
|
|
|
|
|
self.message = message
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class AuthException(Exception):
|
|
|
|
|
"""
|
|
|
|
|
自定义令牌异常AuthException
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def __init__(self, data: str = None, message: str = None):
|
|
|
|
|
self.data = data
|
|
|
|
|
self.message = message
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class PermissionException(Exception):
|
|
|
|
|
"""
|
|
|
|
|
自定义权限异常PermissionException
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def __init__(self, data: str = None, message: str = None):
|
|
|
|
|
self.data = data
|
|
|
|
|
self.message = message
|
2024-05-11 14:58:02 +08:00
|
|
|
|
|
|
|
|
|
2024-07-09 16:25:13 +08:00
|
|
|
class ServiceException(Exception):
|
|
|
|
|
"""
|
|
|
|
|
自定义服务异常ServiceException
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def __init__(self, data: str = None, message: str = None):
|
|
|
|
|
self.data = data
|
|
|
|
|
self.message = message
|
|
|
|
|
|
|
|
|
|
|
2024-07-11 16:47:23 +08:00
|
|
|
class ServiceWarning(Exception):
|
|
|
|
|
"""
|
|
|
|
|
自定义服务警告ServiceWarning
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def __init__(self, data: str = None, message: str = None):
|
|
|
|
|
self.data = data
|
|
|
|
|
self.message = message
|
|
|
|
|
|
|
|
|
|
|
2024-05-11 14:58:02 +08:00
|
|
|
class ModelValidatorException(Exception):
|
|
|
|
|
"""
|
|
|
|
|
自定义模型校验异常ModelValidatorException
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def __init__(self, data: str = None, message: str = None):
|
|
|
|
|
self.data = data
|
|
|
|
|
self.message = message
|