diff idavoll/backend.py @ 159:6fe78048baf9

Rework error handling, depend on Twisted Words 0.4.0. Twisted Words 0.4.0 introduced support for stanza error handling, much better than the custom error handling in Idavoll. Also, all protocol-level errors were examined and brought up to date with version 1.8 of JEP-0060. As a result of the error examination, the retrieval of default configuration options using <default/> is now supported properly.
author Ralph Meijer <ralphm@ik.nu>
date Wed, 06 Sep 2006 12:38:47 +0000
parents 5191ba7c4df8
children ef22e4150caa
line wrap: on
line diff
--- a/idavoll/backend.py	Thu Jun 18 11:52:01 2009 +0000
+++ b/idavoll/backend.py	Wed Sep 06 12:38:47 2006 +0000
@@ -10,21 +10,18 @@
     def __str__(self):
         return self.msg
     
-class NotAuthorized(Error):
+class Forbidden(Error):
     pass
 
-class PayloadExpected(Error):
-    msg = 'Payload expected'
+class ItemForbidden(Error):
+    pass
 
-class NoPayloadAllowed(Error):
-    msg = 'No payload allowed'
+class ItemRequired(Error):
+    pass
 
 class NoInstantNodes(Error):
     pass
 
-class NotImplemented(Error):
-    pass
-
 class NotSubscribed(Error):
     pass
 
@@ -34,6 +31,12 @@
 class InvalidConfigurationValue(Error):
     msg = 'Bad configuration value'
 
+class NodeNotPersistent(Error):
+    pass
+
+class NoRootNode(Error):
+    pass
+
 class IBackendService(Interface):
     """ Interface to a backend service of a pubsub service. """