Source code for yapconf.exceptions

# -*- coding: utf-8 -*-

"""
yapconf.exceptions
~~~~~~~~~~~~~~~~~~

This module contains the set of Yapconf's exceptions.
"""


[docs]class YapconfError(Exception): """There was an error while handling your config""" pass
[docs]class YapconfSpecError(YapconfError): """There was an error detected in the specification provided""" pass
[docs]class YapconfSourceError(YapconfError): """Error occurred attempting to validate or load a config source.""" pass
[docs]class YapconfLoadError(YapconfError): """There was an error while trying to load the overrides provided""" pass
[docs]class YapconfItemError(YapconfError): """There was an error creating a YapconfItem from the specification""" pass
[docs]class YapconfListItemError(YapconfItemError): """There was an error creating a YapconfListItem from the specification""" pass
[docs]class YapconfDictItemError(YapconfItemError): """There was an error creating a YapconfDictItem from the specification""" pass
[docs]class YapconfItemNotFound(YapconfItemError): """We searched through all the overrides and could not find the item""" def __init__(self, message, item): super(YapconfItemNotFound, self).__init__(message) self.item = item
[docs]class YapconfValueError(YapconfItemError): """We found an item in the overrides but it wasn't what we expected""" pass