diff --git a/slapos/slap/interface/slap.py b/slapos/slap/interface/slap.py index a909fa283cfbef3a451c5e6f334275b68b4a164b..a6d8b51f6bcc371bfe33bd71301e6c52965f4ebd 100644 --- a/slapos/slap/interface/slap.py +++ b/slapos/slap/interface/slap.py @@ -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 diff --git a/slapos/slap/slap.py b/slapos/slap/slap.py index a13a31f390f149dce20ceb0839d515dede96fc15..c93d2a1f3f53bc789e2b622d6d21dd3be7a72f07 100644 --- a/slapos/slap/slap.py +++ b/slapos/slap/slap.py @@ -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)