"""Custom exceptions for Schema."""
[docs]
class StructFrameError(Exception):
"""Base exception for all Schema errors."""
pass
[docs]
class SchemaError(StructFrameError):
"""Raised when a schema definition is invalid."""
pass
[docs]
class ValidationError(StructFrameError):
"""Raised when DataFrame validation fails."""
pass
[docs]
class TypeMismatchError(ValidationError):
"""Raised when a column's dtype doesn't match the expected type."""
pass
[docs]
class ConstraintViolationError(ValidationError):
"""Raised when a field-level constraint is violated."""
pass
[docs]
class MissingColumnError(ValidationError):
"""Raised when a required column is missing from the DataFrame."""
pass