diff sat_pubsub/error.py @ 232:923281d4c5bc

renamed idavoll directory to sat_pubsub
author Goffi <goffi@goffi.org>
date Thu, 17 May 2012 12:48:14 +0200
parents idavoll/error.py@a321f9300054
children 564ae55219e1
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sat_pubsub/error.py	Thu May 17 12:48:14 2012 +0200
@@ -0,0 +1,95 @@
+# Copyright (c) 2003-2008 Ralph Meijer
+# See LICENSE for details.
+
+class Error(Exception):
+    msg = ''
+
+    def __init__(self, msg=None):
+        self.msg = msg or self.msg
+
+
+    def __str__(self):
+        return self.msg
+
+
+
+class NodeNotFound(Error):
+    pass
+
+
+
+class NodeExists(Error):
+    pass
+
+
+
+class NotSubscribed(Error):
+    """
+    Entity is not subscribed to this node.
+    """
+
+
+
+class SubscriptionExists(Error):
+    """
+    There already exists a subscription to this node.
+    """
+
+
+
+class Forbidden(Error):
+    pass
+
+
+
+class ItemForbidden(Error):
+    pass
+
+
+
+class ItemRequired(Error):
+    pass
+
+
+
+class NoInstantNodes(Error):
+    pass
+
+
+
+class InvalidConfigurationOption(Error):
+    msg = 'Invalid configuration option'
+
+
+
+class InvalidConfigurationValue(Error):
+    msg = 'Bad configuration value'
+
+
+
+class NodeNotPersistent(Error):
+    pass
+
+
+
+class NoRootNode(Error):
+    pass
+
+
+
+class NoCallbacks(Error):
+    """
+    There are no callbacks for this node.
+    """
+
+
+
+class NoCollections(Error):
+    pass
+
+
+
+class NoPublishing(Error):
+    """
+    This node does not support publishing.
+    """