Newer
Older
Handbook / calendar / teachingdates / config / errors.py
class ConfigurationError(Exception):
    """Exception for general errors while loading a configuration file.
    """
    pass


class ConfigurationKeyError(KeyError):
    """Exception for missing required keys in the configuration file.
    """
    def __init__(self, key, parent, file):
        self.key = key
        self.parent = parent
        self.file = file


class PaperKeyError(ConfigurationKeyError):
    """Exception for missing paper keys in the configuration file.
    """
    pass


class PeriodKeyError(ConfigurationKeyError):
    """Exception for missing teaching period keys in the configuration file.
    """
    pass


class PaperError(KeyError):
    """Exception for missing paper in the configuration.
    """
    pass


class PeriodError(KeyError):
    """Exception for missing teaching period in the configuration.
    """
    pass