1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- # -*- coding: utf-8 -*-
- class TokenException(Exception):
- def __init__(self):
- super().__init__()
- class AuthException(Exception):
- def __init__(self, errmsg: str):
- super().__init__()
- self.errmsg = errmsg
- class ParamException(Exception):
- def __init__(self, param: str):
- super().__init__()
- self.param = param
- class Common404Exception(Exception):
- def __init__(self):
- super().__init__()
- class AppException(Exception):
- def __init__(self, code: int, msg: str):
- super().__init__()
- self.code = code
- self.msg = msg
- class AlertException(Exception):
- def __init__(self, ret: int, msg: str):
- super().__init__()
- self.ret = ret
- self.msg = msg
- class XssException(Exception):
- def __init__(self):
- super().__init__()
- class YzyException(Exception):
- def __init__(self, errcode: int, errmsg: str):
- super().__init__()
- self.errcode = errcode
- self.errmsg = errmsg
- class RoleException(Exception):
- def __init__(self, errcode: int, errmsg: str):
- super().__init__(f"Error {errcode}: {errmsg}")
- self.errcode = errcode
- self.errmsg = errmsg
- class HmacException(Exception):
- def __init__(self, code: int, msg: str):
- super().__init__()
- self.code = code
- self.msg = msg
|