class validator_exception(Exception): def __init__(self, name: str) -> None: super().__init__("Invalid property names: " + name + ".") class exists_exception(Exception): def __init__(self, name: str) -> None: super().__init__("Item with this " + name + " already in database.") class bad_request_exception(Exception): def __init__(self, content: str) -> None: super().__init__("Bad request: " + content + ".") class not_found_exception(Exception): def __init__(self) -> None: super().__init__("Not found required target.") class not_ready_exception(Exception): def __init__(self, target: any) -> None: dump = str(target) what = str(type(target)) info = "Can not work, because " + what + " is not raeady.\n" info = info + "Dump:\n" + what + "\n\n" super().__init__(info)