Source code for grab.spider.errors

from grab.errors import GrabError

__all__ = (
    "SpiderError",
    "SpiderMisuseError",
    "FatalError",
    "SpiderInternalError",
    "NoTaskHandlerError",
    "NoDataHandlerError",
)


[docs]class SpiderError(GrabError): """Base class for Spider exceptions."""
class SpiderConfigurationError(SpiderError): pass
[docs]class SpiderMisuseError(SpiderError): """Improper usage of Spider framework."""
[docs]class FatalError(SpiderError): """Fatal error which should stop parsing process."""
[docs]class SpiderInternalError(SpiderError): """Raises when error throwned by internal spider logic. Like spider class discovering, CLI error. """
[docs]class NoTaskHandlerError(SpiderError): """Raise when no handler found to process network response."""
[docs]class NoDataHandlerError(SpiderError): """Raise when no handler found to process Data object."""