ソースを参照

add exceptions

blezz-tech 3 ヶ月 前
コミット
6396795b3d

+ 1 - 0
exceptions/__init__.py

@@ -0,0 +1 @@
+from .sport import *

+ 2 - 0
exceptions/sport/__init__.py

@@ -0,0 +1,2 @@
+from .order_not_defined import OrderNotDefined
+from .client_not_defined import ClientNotDefined

+ 7 - 0
exceptions/sport/client_not_defined.py

@@ -0,0 +1,7 @@
+class ClientNotDefined(Exception):
+    """
+    If order_synced field is not defined throw exception
+    """
+    def __init__(self, message="client field is not defined"):
+        self.message = message
+        super().__init__(self.message)

+ 7 - 0
exceptions/sport/order_not_defined.py

@@ -0,0 +1,7 @@
+class OrderNotDefined(Exception):
+    """
+    If order_synced field is not defined throw exception
+    """
+    def __init__(self, message="order_synced is not defined"):
+        self.message = message
+        super().__init__(self.message)