123456789101112131415161718192021222324252627 |
- class ExploreDataError(Exception):
- def __init__(self, *args, **kwargs):
- if 'code' not in kwargs and 'reason' not in kwargs:
- kwargs['code'] = 10000
- kwargs['reason'] = '未知的异常错误,请手动处理'
- for key, val in kwargs.items():
- setattr(self, key, val)
- super(ExploreDataError, self).__init__(*args, kwargs)
- class ValidatorError(ExploreDataError):
- def __init__(self, reason, code=10001):
- super(ValidatorError, self).__init__(code=code, reason=reason)
- class TaskError(ExploreDataError):
- def __init__(self, reason, code=10002):
- super(TaskError, self).__init__(code=code, reason=reason)
- class QccError(ExploreDataError):
- def __init__(self, reason, code=10003):
- super(QccError, self).__init__(code=code, reason=reason)
|