-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
25 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
"""GIOS exceptions.""" | ||
|
||
|
||
class GiosError(Exception): | ||
"""Base class for GIOS errors.""" | ||
|
||
def __init__(self, status: str) -> None: | ||
"""Initialize.""" | ||
super().__init__(status) | ||
self.status = status | ||
|
||
|
||
class ApiError(GiosError): | ||
"""Raised when GIOS API request ended in error.""" | ||
|
||
|
||
class InvalidSensorsData(GiosError): | ||
"""Raised when sensors data is invalid.""" | ||
|
||
|
||
class NoStationError(GiosError): | ||
"""Raised when no measuring station error.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters