Source code for gs.config.errors

# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright © 2014 OnlineGroups.net and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
'''The possible configuration errors.'''


[docs]class ConfigError(Exception): '''A generic error with the configuration.'''
[docs]class ConfigPathError(ValueError, ConfigError): '''An error with the path to the config file.'''
[docs]class ConfigFileError(OSError, ConfigError): 'An error with reading the config file'
[docs]class ConfigSetError(ConfigError): '''An error with the structure of the config file.'''
[docs]class ConfigNoSchemaError(KeyError, ConfigError): '''An error raised when there is no schema'''
[docs]class ConfigNoSectionError(ConfigError): '''An error raised when there is no configuration section specified.'''
[docs]class ConfigNoOptionError(ConfigError): '''An error raised when an option is not defined in a schema'''
[docs]class ConfigConvertError(TypeError, ConfigError): '''An error raissed when the value cannot be converted.'''