diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-11-25 11:54:51 -0700 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-11-25 11:54:51 -0700 |
commit | 7350ccbffefdf81992b3ccd8aac814f3bb954be8 (patch) | |
tree | cdd07d157a310f2bb801d736f5d44e65eaa032e2 /ipalib/errors.py | |
parent | 2d458a12339fbb7ef006ff7defc1e2f541e2f23f (diff) | |
download | freeipa-7350ccbffefdf81992b3ccd8aac814f3bb954be8.tar.gz freeipa-7350ccbffefdf81992b3ccd8aac814f3bb954be8.tar.xz freeipa-7350ccbffefdf81992b3ccd8aac814f3bb954be8.zip |
Started fleshing out doodles in xmlrpc.execute()
Diffstat (limited to 'ipalib/errors.py')
-rw-r--r-- | ipalib/errors.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/ipalib/errors.py b/ipalib/errors.py index a01082504..8412d1f65 100644 --- a/ipalib/errors.py +++ b/ipalib/errors.py @@ -125,6 +125,9 @@ class HandledError(StandardError): """ Base class for errors that can be raised across a remote procecdure call. """ + + code = 1 + def __init__(self, message=None, **kw): self.kw = kw if message is None: @@ -132,12 +135,22 @@ class HandledError(StandardError): StandardError.__init__(self, message) + +class UnknownError(HandledError): + """ + Raised when the true error is not a handled error. + """ + + format = _('An unknown internal error has occurred') + + class CommandError(HandledError): format = _('Unknown command %(name)r') + class RemoteCommandError(HandledError): - format = 'Server at %(uri)r has no command %(command)r' + format = 'Server at %(uri)r has no command %(name)r' class UnknownHelpError(InvocationError): |