|
@@ -0,0 +1,19 @@
|
|
|
+
|
|
|
+class JyException(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 VerifyException(JyException):
|
|
|
+
|
|
|
+ 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)
|