Source code for silkworm.declarative.exceptions
from __future__ import annotations
from ..exceptions import SilkwormError
[docs]
class DeclarativeError(SilkwormError):
"""Base exception for declarative extraction."""
[docs]
class DeclarativeConfigurationError(DeclarativeError):
"""Raised when an item declaration cannot be compiled."""
[docs]
class MissingFieldError(FieldExtractionError):
"""Raised when a required element or attribute is absent."""
[docs]
class DeclarativeSerializationError(DeclarativeError):
"""Raised when an item cannot be represented as a JSON value."""
__all__ = [
"DeclarativeConfigurationError",
"DeclarativeError",
"DeclarativeSerializationError",
"FieldExtractionError",
"FieldTransformError",
"MissingFieldError",
]