Update SLAP interface to add exceptions

parent 81c5c5b4
......@@ -35,12 +35,24 @@ class IException(Interface):
Classes which implement IException are used to report errors.
"""
class IServerError(IException):
"""
Classes which implement IServerError are used to report unexpected error
from the slap server.
"""
class INotFoundError(IException):
"""
Classes which implement INotFoundError are used to report missing
informations on the slap server.
"""
class IResourceNotReady(IException):
"""
Classes which implement IResourceNotReady are used to report resource not
ready on the slap server.
"""
class IUnauthorized(IException):
"""
Classes which implement IUnauthorized are used to report missing
......
......@@ -140,10 +140,10 @@ class SoftwareInstance(SlapDocument):
"""Exposed exceptions"""
# XXX Why do we need to expose exceptions?
class ResourceNotReady(Exception):
pass
zope.interface.implements(interface.IResourceNotReady)
class ServerError(Exception):
pass
zope.interface.implements(interface.IServerError)
class NotFoundError(Exception):
zope.interface.implements(interface.INotFoundError)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment