How to use the isbntools.dev._exceptions.ISBNToolsDevException function in isbntools

To help you get started, we’ve selected a few isbntools 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 xlcnd / isbntools / isbntools / dev / _exceptions.py View on Github external
class ISBNToolsHTTPError(ISBNToolsDevException):

    """Exception raised for HTTP related errors."""

    message = "an HTTP error has ocurred"


class ISBNToolsURLError(ISBNToolsDevException):

    """Exception raised for URL related errors."""

    message = "an URL error has ocurred"


class DataNotFoundAtServiceError(ISBNToolsDevException):

    """Exception raised when there is no target data from the service."""

    message = "the target data was not found at this service"


class ServiceIsDownError(ISBNToolsDevException):

    """Exception raised when the service is not available."""

    message = "the service is down (try later)"


class DataWrongShapeError(ISBNToolsDevException):

    """Exception raised when the data hasn't the expected format."""
github xlcnd / isbntools / isbntools / dev / _exceptions.py View on Github external
class ServiceIsDownError(ISBNToolsDevException):

    """Exception raised when the service is not available."""

    message = "the service is down (try later)"


class DataWrongShapeError(ISBNToolsDevException):

    """Exception raised when the data hasn't the expected format."""

    message = "the data hasn't the expected format"


class NoDataForSelectorError(ISBNToolsDevException):

    """Exception raised when there is no data for the selector."""

    message = "no data for this selector"


class NotValidMetadataError(ISBNToolsDevException):

    """Exception raised when the metadata hasn't the expected format."""

    message = "the metadata hasn't the expected format"


class RecordMappingError(ISBNToolsDevException):

    """Exception raised when the mapping records -> canonical doesn't work."""
github xlcnd / isbntools / isbntools / dev / _exceptions.py View on Github external
class RecordMappingError(ISBNToolsDevException):

    """Exception raised when the mapping records -> canonical doesn't work."""

    message = "the mapping `canonical <- records` doesn't work"


class NoAPIKeyError(ISBNToolsDevException):

    """Exception raised when the API Key for a service is not found."""

    message = "this service needs an API key"


class FileNotFoundError(ISBNToolsDevException):

    """Exception raised when a given file doesn't exist."""

    message = "the file wasn't found"
github xlcnd / isbntools / isbntools / dev / _exceptions.py View on Github external
class DataNotFoundAtServiceError(ISBNToolsDevException):

    """Exception raised when there is no target data from the service."""

    message = "the target data was not found at this service"


class ServiceIsDownError(ISBNToolsDevException):

    """Exception raised when the service is not available."""

    message = "the service is down (try later)"


class DataWrongShapeError(ISBNToolsDevException):

    """Exception raised when the data hasn't the expected format."""

    message = "the data hasn't the expected format"


class NoDataForSelectorError(ISBNToolsDevException):

    """Exception raised when there is no data for the selector."""

    message = "no data for this selector"


class NotValidMetadataError(ISBNToolsDevException):

    """Exception raised when the metadata hasn't the expected format."""
github xlcnd / isbntools / isbntools / dev / _exceptions.py View on Github external
only subclasses of this exception should be used!

    However, you could use it to catch all errors defined
    by his subclasses.

    """

    def __init__(self, msg=None):
        if msg:
            self.message = '%s (%s)' % (self.message, msg)

    def __str__(self):
        return getattr(self, 'message', '')       # pragma: no cover


class ISBNToolsHTTPError(ISBNToolsDevException):

    """Exception raised for HTTP related errors."""

    message = "an HTTP error has ocurred"


class ISBNToolsURLError(ISBNToolsDevException):

    """Exception raised for URL related errors."""

    message = "an URL error has ocurred"


class DataNotFoundAtServiceError(ISBNToolsDevException):

    """Exception raised when there is no target data from the service."""
github xlcnd / isbntools / isbntools / dev / _exceptions.py View on Github external
class NoDataForSelectorError(ISBNToolsDevException):

    """Exception raised when there is no data for the selector."""

    message = "no data for this selector"


class NotValidMetadataError(ISBNToolsDevException):

    """Exception raised when the metadata hasn't the expected format."""

    message = "the metadata hasn't the expected format"


class RecordMappingError(ISBNToolsDevException):

    """Exception raised when the mapping records -> canonical doesn't work."""

    message = "the mapping `canonical <- records` doesn't work"


class NoAPIKeyError(ISBNToolsDevException):

    """Exception raised when the API Key for a service is not found."""

    message = "this service needs an API key"


class FileNotFoundError(ISBNToolsDevException):

    """Exception raised when a given file doesn't exist."""
github xlcnd / isbntools / isbntools / dev / _exceptions.py View on Github external
def __init__(self, msg=None):
        if msg:
            self.message = '%s (%s)' % (self.message, msg)

    def __str__(self):
        return getattr(self, 'message', '')       # pragma: no cover


class ISBNToolsHTTPError(ISBNToolsDevException):

    """Exception raised for HTTP related errors."""

    message = "an HTTP error has ocurred"


class ISBNToolsURLError(ISBNToolsDevException):

    """Exception raised for URL related errors."""

    message = "an URL error has ocurred"


class DataNotFoundAtServiceError(ISBNToolsDevException):

    """Exception raised when there is no target data from the service."""

    message = "the target data was not found at this service"


class ServiceIsDownError(ISBNToolsDevException):

    """Exception raised when the service is not available."""
github xlcnd / isbntools / isbntools / dev / _exceptions.py View on Github external
class ISBNToolsURLError(ISBNToolsDevException):

    """Exception raised for URL related errors."""

    message = "an URL error has ocurred"


class DataNotFoundAtServiceError(ISBNToolsDevException):

    """Exception raised when there is no target data from the service."""

    message = "the target data was not found at this service"


class ServiceIsDownError(ISBNToolsDevException):

    """Exception raised when the service is not available."""

    message = "the service is down (try later)"


class DataWrongShapeError(ISBNToolsDevException):

    """Exception raised when the data hasn't the expected format."""

    message = "the data hasn't the expected format"


class NoDataForSelectorError(ISBNToolsDevException):

    """Exception raised when there is no data for the selector."""
github xlcnd / isbntools / isbntools / dev / _exceptions.py View on Github external
class NotValidMetadataError(ISBNToolsDevException):

    """Exception raised when the metadata hasn't the expected format."""

    message = "the metadata hasn't the expected format"


class RecordMappingError(ISBNToolsDevException):

    """Exception raised when the mapping records -> canonical doesn't work."""

    message = "the mapping `canonical <- records` doesn't work"


class NoAPIKeyError(ISBNToolsDevException):

    """Exception raised when the API Key for a service is not found."""

    message = "this service needs an API key"


class FileNotFoundError(ISBNToolsDevException):

    """Exception raised when a given file doesn't exist."""

    message = "the file wasn't found"
github xlcnd / isbntools / isbntools / dev / _exceptions.py View on Github external
class DataWrongShapeError(ISBNToolsDevException):

    """Exception raised when the data hasn't the expected format."""

    message = "the data hasn't the expected format"


class NoDataForSelectorError(ISBNToolsDevException):

    """Exception raised when there is no data for the selector."""

    message = "no data for this selector"


class NotValidMetadataError(ISBNToolsDevException):

    """Exception raised when the metadata hasn't the expected format."""

    message = "the metadata hasn't the expected format"


class RecordMappingError(ISBNToolsDevException):

    """Exception raised when the mapping records -> canonical doesn't work."""

    message = "the mapping `canonical <- records` doesn't work"


class NoAPIKeyError(ISBNToolsDevException):

    """Exception raised when the API Key for a service is not found."""