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.""" pass
[docs] class InvalidDataFormatException(DataParsingException): """Exception raised for errors in the input data format.""" pass
[docs] class DataExtractionException(ResponseProcessingException): """Base exception for errors that occur during data extraction.""" pass
[docs] class FieldNotFoundException(DataExtractionException): """Exception raised when an expected field is not found in the data.""" pass
[docs] class DataProcessingException(ResponseProcessingException): """Base exception for errors that occur during data processing.""" pass
[docs] class DataValidationException(DataProcessingException): """Exception raised for data validation errors.""" pass
__all__ = [ "ResponseProcessingException", "DataParsingException", "InvalidDataFormatException", "DataExtractionException", "FieldNotFoundException", "DataProcessingException", "DataValidationException", ]