mirror of
https://github.com/kittywitch/konawall-py.git
synced 2026-02-09 20:39:18 -08:00
Initial commit, win32 and darwin support only
This commit is contained in:
commit
40df439299
14 changed files with 527 additions and 0 deletions
14
custom_errors.py
Normal file
14
custom_errors.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
class RequestFailed(Exception):
|
||||
"Raised when a request fails."
|
||||
|
||||
def __init__(self, status_code: int):
|
||||
self.status_code = status_code
|
||||
self.message = f"Request failed with status code {self.status_code}"
|
||||
super().__init__(self.message)
|
||||
|
||||
class UnsupportedPlatform(Exception):
|
||||
"Raised when the platform is not supported."
|
||||
|
||||
def __init__(self, message: str):
|
||||
self.message = message
|
||||
super().__init__(self.message)
|
||||
Loading…
Add table
Add a link
Reference in a new issue