45 lines
1 KiB
Python
45 lines
1 KiB
Python
#ValueError if function's parameter not correct
|
|
# or if not logical
|
|
# or if validation falied
|
|
#TypeError if parameter has no good type
|
|
#AttributeError if no option or optiondescription in optiondescription (also when specified a path)
|
|
|
|
|
|
class AmbigousOptionError(StandardError):
|
|
"more than one option"
|
|
pass
|
|
|
|
|
|
class ConfigError(StandardError):
|
|
"""if modify frozen config
|
|
or try to change owner for an option without value
|
|
or if error in calculation"""
|
|
pass
|
|
|
|
|
|
class ConflictConfigError(ConfigError):
|
|
"duplicate config"
|
|
pass
|
|
|
|
|
|
class PropertiesOptionError(AttributeError):
|
|
"try to access to opt with not allowed property"
|
|
def __init__(self, msg, proptype):
|
|
self.proptype = proptype
|
|
super(PropertiesOptionError, self).__init__(msg)
|
|
|
|
|
|
class RequirementRecursionError(StandardError):
|
|
"recursive error"
|
|
pass
|
|
|
|
|
|
class MandatoryError(Exception):
|
|
"mandatory error"
|
|
pass
|
|
|
|
|
|
class MultiTypeError(Exception):
|
|
"""multi must be a list
|
|
or error with multi length"""
|
|
pass
|