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)

class in_collection_exception(Exception):
    pass

class config_exception(Exception):
    pass

class access_denied_exception(Exception):
    def __init__(self) -> None:
        super().__init__("Being logged in is required to access this.")

class image_exception(Exception):
    def __init__(self) -> None:
        super().__init__("This is not property image file.")

class directory_image_exception(Exception):
    pass

class autoadder_exception(Exception):
    pass

class image_save_exception(Exception):
    def __init__(self, before: Exception) -> None:
        super().__init__("Can not save image: " + str(before))

class incomplete_request_exception(Exception):
    def __init__(self, name: str) -> None:
        content = "Request is not complete. This endpoint require " 
        content = content + "\"" + name + "\"."

        super().__init__(content)

class reservation_exception(Exception):
    pass

class empty_field_exception(Exception):
    def __init__(self, name: str) -> None:
        super().__init__("Field " + name + " is empty. Fill it.")

class reservation_loader_exception(Exception):
    pass

class database_exception(Exception):
    def __init__(self) -> None:
        super().__init__("Database can not commit changes.")

class incorrect_target_exception(Exception):
    pass
