Source code for scholar_flux.exceptions.data_exceptions

# /exceptions/data_exceptions.py
"""Implements exceptions for handling scenarios that could occur during the parsing, extraction, and processing of
response data."""


[docs] class ResponseProcessingException(Exception): """Base Exception for handling errors in response parsing and processing."""
[docs] class DataParsingException(ResponseProcessingException): """Base exception for errors that occur during data parsing."""
[docs] class InvalidDataFormatException(DataParsingException): """Exception raised for errors in the input data format."""
[docs] class DataExtractionException(ResponseProcessingException): """Base exception for errors that occur during data extraction."""
[docs] class FieldNotFoundException(DataExtractionException): """Exception raised when an expected field is not found in the data."""
[docs] class DataProcessingException(ResponseProcessingException): """Base exception for errors that occur during data processing."""
[docs] class DataValidationException(DataProcessingException): """Exception raised for data validation errors."""
__all__ = [ "ResponseProcessingException", "DataParsingException", "InvalidDataFormatException", "DataExtractionException", "FieldNotFoundException", "DataProcessingException", "DataValidationException", ]