Skip to content

Exceptions

Bases: Exception

Base class for ValidationError Parameters: key: Current Column key msg: Validation error message.

Source code in sqlalchemy_file/exceptions.py
class ValidationError(Exception):
    """Base class for ValidationError
    Parameters:
        key: Current Column key
        msg: Validation error message.
    """

    def __init__(self, key: str, msg: str):  # pragma: no cover
        super().__init__(f"{key}: {msg}")
        self.key = key
        self.msg = msg

Bases: ValidationError

Source code in sqlalchemy_file/exceptions.py
class SizeValidationError(ValidationError):
    pass

Bases: ValidationError

Source code in sqlalchemy_file/exceptions.py
class ContentTypeValidationError(ValidationError):
    pass

Bases: ValidationError

Source code in sqlalchemy_file/exceptions.py
class InvalidImageError(ValidationError):
    pass

Bases: ValidationError

Source code in sqlalchemy_file/exceptions.py
class DimensionValidationError(ValidationError):
    pass

Bases: ValidationError

Source code in sqlalchemy_file/exceptions.py
class AspectRatioValidationError(ValidationError):
    pass