[silva.core.interfaces][Sylvain Viollon] Add a new bundle error.

[email protected] Thu, 14 Nov 2013 15:19:48 +0100
Newsgroups gmane.comp.web.zope.silva.cvs
Message-ID <[email protected]>
author:    Sylvain Viollon
date:      Thu Nov 14 15:19:46 2013 +0100
revision:  255:c90abd9e19e8 in silva.core.interfaces
branch:    2.4
details:   https://hg.infrae.com/silva.core.interfaces?cmd=changeset;node=c90abd9e19e8
modified:  src/silva/core/interfaces/errors.py
added:     
removed:   
log:       Add a new bundle error.


diffstat:

 src/silva/core/interfaces/errors.py |  16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diffs (33 lines):

diff -r 6c94abc62091 -r c90abd9e19e8 src/silva/core/interfaces/errors.py
--- a/src/silva/core/interfaces/errors.py	Mon Nov 11 14:49:24 2013 +0100
+++ b/src/silva/core/interfaces/errors.py	Thu Nov 14 15:19:46 2013 +0100
@@ -52,6 +52,14 @@
         u'Related content to the error.')
 
 
+class IContentErrorBundle(IContentError):
+    """An error related to a specific content in Silva that is
+    actually due a bundle of other errors.
+    """
+    errors = Attribute(
+        u'List of errors')
+
+
 class IUpgradeError(IContentError):
     """An error related to the upgrade of a content during the upgrade
     process in Silva.
@@ -116,6 +124,14 @@
         self.content = content
 
 
+class ContentErrorBundle(ContentError):
+    implements(IContentErrorBundle)
+
+    def __init__(self, reason, content, errors):
+        super(ContentErrorBundle, self).__init__(reason, content)
+        self.errors = errors
+
+
 class UpgradeError(ContentError):
     implements(IUpgradeError)