"""
Exceptions for the ASpecD package.

For preventing cyclic imports and for a better overview, all exception
classes of the ASpecD package are collected in this module. It is save for
every other module to import this module, as this module does *not* depend
on any other modules.

"""


class Error(Exception):
    """Base class for exceptions in this module."""


class MissingParameterError(Error):
    """Exception raised when a necessary parameter is missing.

    Specify the parameter in the message, to give users a hint what went wrong.

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingPlotterError(Error):
    """Exception raised when no plotter is provided.

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingDatasetError(Error):
    """Exception raised when no dataset exists to act on

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingSaverError(Error):
    """Exception raised when no saver is provided.

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingFilenameError(Error):
    """Exception raised when no filename was provided

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingPlotError(Error):
    """Exception raised when no plot exists to save.

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingFigureError(Error):
    """Exception raised when no figure is provided.

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingAxisError(Error):
    """Exception raised when no axis is provided.

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingLegendError(Error):
    """Exception raised when no legend is provided.

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingDrawingError(Error):
    """Exception raised when no drawing (line, ...) is provided.

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingTargetError(Error):
    """Exception raised when expecting a filename but none is provided

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingRecipeError(Error):
    """Exception raised when no recipe exists to act on.

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingSourceError(Error):
    """Exception raised when expecting a filename but none is provided

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingProcessingStepError(Error):
    """Exception raised trying to process without processing_step

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingAnalysisStepError(Error):
    """Exception raised trying to analyse without analysis_step

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class UndoWithEmptyHistoryError(Error):
    """Exception raised trying to undo with empty history

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class UndoAtBeginningOfHistoryError(Error):
    """Exception raised trying to undo with history pointer at zero

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class UndoStepUndoableError(Error):
    """Exception raised trying to undo an undoable step of history

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class RedoAlreadyAtLatestChangeError(Error):
    """Exception raised trying to redo with empty history

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class ProcessingWithLeadingHistoryError(Error):
    """Exception raised trying to process with leading history

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingImporterFactoryError(Error):
    """Exception raised when no ImporterFactory instance is provided

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class AxesCountError(Error):
    """Exception raised for wrong number of axes

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class AxesValuesInconsistentWithDataError(Error):
    """Exception raised for axes values inconsistent with data

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingImporterError(Error):
    """Exception raised importing without :class:`aspecd.io.DatasetImporter`

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingExporterError(Error):
    """Exception raised importing without :class:`aspecd.io.DatasetExporter`

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class NoContentError(Error):
    """Exception raised when no content was provided

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class UnknownScopeError(Error):
    """Exception raised when unknown scope was tried to set

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingAnnotationError(Error):
    """Exception raised when no annotation exists to act on

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class InfofileTypeError(Error):
    """Exception raised for wrong file format.

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class InfofileEmptyError(Error):
    """Exception raised for empty file.

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class NotApplicableToDatasetError(Error):
    """Exception raised when task is not applicable to dataset.

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class StyleNotFoundError(Error):
    """Exception raised when the requested style could not be found

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class LaTeXExecutableNotFoundError(Error):
    """Exception raised when the LaTeX executable could not be found

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingDictError(Error):
    """Exception raised when expecting a dict but none is provided

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingDatasetFactoryError(Error):
    """Exception raised when no ImporterFactory instance is provided

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingTaskFactoryError(Error):
    """Exception raised when no TaskFactory instance is provided

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingTaskDescriptionError(Error):
    """Exception raised when no description for creating a task is provided

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message


class MissingDatasetIdentifierError(Error):
    """Exception raised when no dataset id is provided

    Attributes
    ----------
    message : :class:`str`
        explanation of the error

    """

    def __init__(self, message=""):
        super().__init__(message)
        self.message = message
