summaryrefslogtreecommitdiffstats
path: root/ipalib/errors2.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2009-01-22 18:48:21 -0700
committerRob Crittenden <rcritten@redhat.com>2009-02-03 15:29:01 -0500
commit244346dbcbe999bb921ee792ddc2ac222532cc56 (patch)
tree5c6e88a733cb9e304e03a37a792df0358b7f54b4 /ipalib/errors2.py
parent833088955c0e6c606bc8ea96a05ddf6c3a34bc6b (diff)
downloadfreeipa.git-244346dbcbe999bb921ee792ddc2ac222532cc56.tar.gz
freeipa.git-244346dbcbe999bb921ee792ddc2ac222532cc56.tar.xz
freeipa.git-244346dbcbe999bb921ee792ddc2ac222532cc56.zip
More work on xmlrpc stuff, started migrated more code to use errors2 instead of errors
Diffstat (limited to 'ipalib/errors2.py')
-rw-r--r--ipalib/errors2.py32
1 files changed, 29 insertions, 3 deletions
diff --git a/ipalib/errors2.py b/ipalib/errors2.py
index 04258093..91b23115 100644
--- a/ipalib/errors2.py
+++ b/ipalib/errors2.py
@@ -85,7 +85,9 @@ current block assignments:
- **4001 - 4099** Open for general execution errors
- - **4100 - 4199** `LDAPError` and its subclasses
+ - **4100 - 4199** `BuiltinError` and its subclasses
+
+ - **4200 - 4299** `LDAPError` and its subclasses
- **4300 - 4999** *Reserved for future use*
@@ -581,14 +583,38 @@ class ExecutionError(PublicError):
errno = 4000
-class LDAPError(ExecutionError):
+class BuiltinError(ExecutionError):
"""
- **4100** Base class for LDAP execution errors (*4100 - 4199*).
+ **4100** Base class for builtin execution errors (*4100 - 4199*).
"""
errno = 4100
+class HelpError(BuiltinError):
+ """
+ **4101** Raised when requesting help for an unknown topic.
+
+ For example:
+
+ >>> raise HelpError(topic='newfeature')
+ Traceback (most recent call last):
+ ...
+ HelpError: no command nor help topic 'newfeature'
+ """
+
+ errno = 4101
+ format = _('no command nor help topic %(topic)r')
+
+
+class LDAPError(ExecutionError):
+ """
+ **4200** Base class for LDAP execution errors (*4200 - 4299*).
+ """
+
+ errno = 4200
+
+
##############################################################################
# 5000 - 5999: Generic errors