How to use the memorious.exc.MemoriousException function in memorious

To help you get started, we’ve selected a few memorious examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alephdata / memorious / memorious / exc.py View on Github external
class MemoriousException(Exception):
    """Base exception class."""
    pass


class QueueTooBigError(MemoriousException):
    pass


class ConfigurationError(MemoriousException):
    """A configuration option is not set."""


class RuleParsingException(MemoriousException):
    """A rule encounters something it can't parse."""
    pass


class StorageFileMissing(MemoriousException):
    """A file could not be found in the blob storage."""

    def __init__(self, content_hash, file_name=None):
        self.content_hash = content_hash
        self.file_name = file_name
        msg = 'Could not load: %s' % content_hash
        super(StorageFileMissing, self).__init__(msg)
github alephdata / memorious / memorious / exc.py View on Github external
class MemoriousException(Exception):
    """Base exception class."""
    pass


class QueueTooBigError(MemoriousException):
    pass


class ConfigurationError(MemoriousException):
    """A configuration option is not set."""


class RuleParsingException(MemoriousException):
    """A rule encounters something it can't parse."""
    pass


class StorageFileMissing(MemoriousException):
    """A file could not be found in the blob storage."""

    def __init__(self, content_hash, file_name=None):
        self.content_hash = content_hash
        self.file_name = file_name
        msg = 'Could not load: %s' % content_hash
        super(StorageFileMissing, self).__init__(msg)


class ParseError(MemoriousException):
    """An error while parsing a structured HTTP response."""
github alephdata / memorious / memorious / exc.py View on Github external
class MemoriousException(Exception):
    """Base exception class."""
    pass


class QueueTooBigError(MemoriousException):
    pass


class ConfigurationError(MemoriousException):
    """A configuration option is not set."""


class RuleParsingException(MemoriousException):
    """A rule encounters something it can't parse."""
    pass


class StorageFileMissing(MemoriousException):
    """A file could not be found in the blob storage."""

    def __init__(self, content_hash, file_name=None):
github alephdata / memorious / memorious / exc.py View on Github external
class RuleParsingException(MemoriousException):
    """A rule encounters something it can't parse."""
    pass


class StorageFileMissing(MemoriousException):
    """A file could not be found in the blob storage."""

    def __init__(self, content_hash, file_name=None):
        self.content_hash = content_hash
        self.file_name = file_name
        msg = 'Could not load: %s' % content_hash
        super(StorageFileMissing, self).__init__(msg)


class ParseError(MemoriousException):
    """An error while parsing a structured HTTP response."""
    pass


class RateLimitException(Exception):
    """Rate limit exceeded for a crawler operation"""
    pass
github alephdata / memorious / memorious / exc.py View on Github external
class QueueTooBigError(MemoriousException):
    pass


class ConfigurationError(MemoriousException):
    """A configuration option is not set."""


class RuleParsingException(MemoriousException):
    """A rule encounters something it can't parse."""
    pass


class StorageFileMissing(MemoriousException):
    """A file could not be found in the blob storage."""

    def __init__(self, content_hash, file_name=None):
        self.content_hash = content_hash
        self.file_name = file_name
        msg = 'Could not load: %s' % content_hash
        super(StorageFileMissing, self).__init__(msg)


class ParseError(MemoriousException):
    """An error while parsing a structured HTTP response."""
    pass


class RateLimitException(Exception):
    """Rate limit exceeded for a crawler operation"""