aboutsummaryrefslogtreecommitdiffstats
path: root/fnme
diff options
context:
space:
mode:
Diffstat (limited to 'fnme')
-rw-r--r--fnme/exceptions.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/fnme/exceptions.py b/fnme/exceptions.py
new file mode 100644
index 0000000..29e317e
--- /dev/null
+++ b/fnme/exceptions.py
@@ -0,0 +1,34 @@
+class LocationError(Exception):
+ """Exception raised for errors related to fetching location.
+
+ Attributes:
+ message -- explanation of the error
+ """
+
+ def __init__(self, message):
+ self.message = message
+ super().__init__(self.message)
+
+
+class DataFetchError(Exception):
+ """Exception raised for errors related to fetching latest data.
+
+ Attributes:
+ message -- explanation of the error
+ """
+
+ def __init__(self, message):
+ self.message = message
+ super().__init__(self.message)
+
+
+class InvalidDataError(Exception):
+ """Exception raised for errors related to the contents of the data.
+
+ Attributes:
+ message -- explanation of the error
+ """
+
+ def __init__(self, message):
+ self.message = message
+ super().__init__(self.message)
git.ajschof.me — hosted by ajschofield — powered by cgit