feat: build

This commit is contained in:
2024-04-09 10:32:17 +02:00
parent 5ba38916d6
commit fc2414dc68
93 changed files with 42 additions and 26 deletions

View File

@@ -0,0 +1 @@
__all__ = ["config"]

View File

@@ -0,0 +1,28 @@
class SettingException(Exception):
pass
class SettingNotFound(SettingException):
def __init__(self, setting_name: str):
self.setting_name = setting_name
def __str__(self):
return f"Setting '{self.setting_name}' not found."
class SettingValueError(SettingException):
def __init__(self, setting_name: str, setting_value: str, rule: str):
"""
The rule has to be such, that the following format makes sense:
{name} {rule}, not '{value}'
:param setting_name:
:param setting_value:
:param rule:
"""
self.setting_name = setting_name
self.setting_value = setting_value
self.rule = rule
def __str__(self):
return f"{self.setting_name} {self.rule}, not '{self.setting_value}'."

View File

@@ -0,0 +1,11 @@
class DownloadException(Exception):
pass
class UrlNotFoundException(DownloadException):
def __init__(self, url: str, *args: object) -> None:
self.url = url
super().__init__(*args)
def __str__(self) -> str:
return f"Couldn't find the page of {self.url}"

View File

@@ -0,0 +1,10 @@
class ObjectException(Exception):
pass
class IsDynamicException(Exception):
"""
Gets raised, if a dynamic data object tries to perform an action,
which does not make sense for a dynamic object.
"""
pass