Skip to content
errors.py 1.5 KiB
Newer Older
Franziska Koehn's avatar
Franziska Koehn committed
"""
:Author: Franziska Koehn
:Created: 2015/01/13

Franziska Koehn's avatar
Franziska Koehn committed
This module houses all classes of Exceptions of xsa.
Some are defined here just to hide exceptions from different libraries.
Franziska Koehn's avatar
Franziska Koehn committed
"""

class Error(Exception):
Franziska Koehn's avatar
Franziska Koehn committed
    """A new Exception-class, to differentiate between xsa and non-xsa Exceptions"""
    pass

class ServerNotFoundError(Error):
Franziska Koehn's avatar
Franziska Koehn committed
    """Should be raised when the server was not found."""
    pass

class DatabaseError(Error):
Franziska Koehn's avatar
Franziska Koehn committed
    """Should be raised when a DatabaseError occured."""
    pass

class UnauthorizedError(Error):
Franziska Koehn's avatar
Franziska Koehn committed
    """Should be raised when the user-name or -password was incorrect."""
    pass

class ResponseNotReady(Error):
Franziska Koehn's avatar
Franziska Koehn committed
    """Should be raised when the response was not ready."""
    pass

class EmptyResultset(Error):
Franziska Koehn's avatar
Franziska Koehn committed
    """Should be raised when the resultset of the given search is empty."""
    pass

class QueryError(Error):
Franziska Koehn's avatar
Franziska Koehn committed
    """Should be raised when the query-definition is incompatible."""
    """Should be raised when no REST-API was defined in the json-file of a root-type"""
class NoExtraSourceError(Error):
    """Should be raised when no comparision was defined in the json-file of a root-type"""
    pass

class CorruptedQueryError(Error):
Franziska Koehn's avatar
Franziska Koehn committed
    """Should be raised when the query-definition can not be loaded from file."""
    pass
Franziska Koehn's avatar
Franziska Koehn committed

class DownloadError(Error):
    """Should be raised when an error occurred while downloading."""
    pass

class WritingError(Error):
    """Should be raised when an error occurred while writing something."""
    pass