diff options
Diffstat (limited to 'fnme/exceptions.py')
| -rw-r--r-- | fnme/exceptions.py | 34 |
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) |
