From 91adc9c2d060b65d96a8515d08fc7192be79da83 Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Sat, 19 Jul 2008 07:43:48 +0000 Subject: 6: Fleshed out API.register_command, made correpsonding unit tests much more rigorous --- ipalib/exceptions.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'ipalib/exceptions.py') diff --git a/ipalib/exceptions.py b/ipalib/exceptions.py index 4150d712..4584c1ee 100644 --- a/ipalib/exceptions.py +++ b/ipalib/exceptions.py @@ -45,16 +45,20 @@ class IPAError(Exception): return self.msg % self.kw -class SetAttributeError(IPAError): - msg = 'Cannot set %r: NameSpace does not allow attribute setting' +class SetError(IPAError): + msg = 'setting %r, but NameSpace does not allow attribute setting' class OverrideError(IPAError): - msg = 'Unexpected override of %r; use override=True if intended' + msg = 'unexpected override of %r (use override=True if intended)' + + +class DuplicateError(IPAError): + msg = 'class %r at %d was already registered' class RegistrationError(IPAError): - msg = '%r is not a subclass of %s' + msg = '%r must be a subclass of %s' class PrefixError(IPAError): -- cgit