12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- class JyBasicException(Exception):
- def __init__(self, code: int, reason: str, **kwargs):
- self.code = code
- self.reason = reason
- self.err_details = kwargs
- for key, val in kwargs.items():
- setattr(self, key, val)
- class CustomAccountPrivilegeError(JyBasicException):
- def __init__(self, code: int = 10001, reason: str = '账号权限登录异常', **kwargs):
- self.code = code
- self.reason = reason
- self.err_details = kwargs
- for key, val in kwargs.items():
- setattr(self, key, val)
- class CustomCheckError(JyBasicException):
- def __init__(self, code: int = 10002, reason: str = '特征条件检查异常', **kwargs):
- self.code = code
- self.reason = reason
- self.err_details = kwargs
- for key, val in kwargs.items():
- setattr(self, key, val)
- class VoidCrawlError(JyBasicException):
- def __init__(self, code: int = 10003, reason: str = '空页面采集错误', **kwargs):
- self.code = code
- self.reason = reason
- self.err_details = kwargs
- for key, val in kwargs.items():
- setattr(self, key, val)
- class AttachmentNullError(JyBasicException):
- def __init__(self, code: int = 10004, reason: str = '附件下载异常', **kwargs):
- self.code = code
- self.reason = reason
- self.err_details = kwargs
- for key, val in kwargs.items():
- setattr(self, key, val)
|