123456789101112131415161718192021222324252627282930313233343536 |
- 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 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 CustomAccountPrivilegeError(JyBasicException):
- def __init__(self, *args, **kwargs):
- pass
|