Coverage for gidappdata\utility\exceptions.py : 47%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1class GidAppDataBaseException(Exception):
2 pass
5class ConstructionEnvDataMissing(GidAppDataBaseException):
6 def __init__(self, env_var_name):
7 self.message = f"Variable '{env_var_name}' has not been set in the construction env file"
8 super().__init__(self.message)
11class DevSettingError(GidAppDataBaseException):
12 def __init__(self):
13 self.message = "'redirect' has to be an directory if 'dev' is set to 'True'"
14 super().__init__(self.message)
17class IsDuplicateNameError(GidAppDataBaseException):
18 def __init__(self, name: str, full_path, is_file: bool = True):
19 self.name = name
20 self.full_path = full_path
21 self.typus = "file" if is_file is True else "folder"
22 self.msg = f"The {self.typus} name {self.name} ('{self.full_path}') already exists in this user_data dir, all file names and folder names need to be unique."
23 super().__init__(self.msg)