dongzhaorui 3 жил өмнө
parent
commit
8953a9812b

+ 19 - 0
find_source/common/execptions.py

@@ -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)