tiramisu/tiramisu/error.py

46 lines
1.0 KiB
Python
Raw Normal View History

2013-04-14 12:01:32 +02:00
#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)
2013-04-14 12:01:32 +02:00
class AmbigousOptionError(StandardError):
"more than one option"
pass
2013-04-14 12:01:32 +02:00
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):
2013-04-14 12:01:32 +02:00
"duplicate config"
pass
class PropertiesOptionError(AttributeError):
2013-04-14 12:01:32 +02:00
"try to access to opt with not allowed property"
2012-10-16 15:09:52 +02:00
def __init__(self, msg, proptype):
self.proptype = proptype
super(PropertiesOptionError, self).__init__(msg)
2013-04-14 12:01:32 +02:00
class RequirementRecursionError(StandardError):
"recursive error"
pass
class MandatoryError(Exception):
2013-04-14 12:01:32 +02:00
"mandatory error"
2013-02-21 17:07:00 +01:00
pass
2013-02-22 11:09:17 +01:00
class MultiTypeError(Exception):
2013-04-14 12:01:32 +02:00
"""multi must be a list
or error with multi length"""
2013-02-22 11:09:17 +01:00
pass