summaryrefslogtreecommitdiffstats
path: root/ipalib/errors.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/errors.py')
-rw-r--r--ipalib/errors.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/ipalib/errors.py b/ipalib/errors.py
index 47e0a3ed..afc61dd8 100644
--- a/ipalib/errors.py
+++ b/ipalib/errors.py
@@ -64,11 +64,23 @@ class NormalizationError(ValidationError):
class RuleError(ValidationError):
+ """
+ Raised when a required option was not provided.
+ """
def __init__(self, name, value, rule, error):
self.rule = rule
ValidationError.__init__(self, name, value, error)
+class RequirementError(ValidationError):
+ """
+ Raised when a required option was not provided.
+ """
+ def __init__(self, name):
+ ValidationError.__init__(self, name, None,
+ 'missing required value'
+ )
+
class SetError(IPAError):
msg = 'setting %r, but NameSpace does not allow attribute setting'