comparison 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
comparison
equal deleted inserted replaced
231:d99047cd90f9 232:923281d4c5bc
1 # Copyright (c) 2003-2008 Ralph Meijer
2 # See LICENSE for details.
3
4 class Error(Exception):
5 msg = ''
6
7 def __init__(self, msg=None):
8 self.msg = msg or self.msg
9
10
11 def __str__(self):
12 return self.msg
13
14
15
16 class NodeNotFound(Error):
17 pass
18
19
20
21 class NodeExists(Error):
22 pass
23
24
25
26 class NotSubscribed(Error):
27 """
28 Entity is not subscribed to this node.
29 """
30
31
32
33 class SubscriptionExists(Error):
34 """
35 There already exists a subscription to this node.
36 """
37
38
39
40 class Forbidden(Error):
41 pass
42
43
44
45 class ItemForbidden(Error):
46 pass
47
48
49
50 class ItemRequired(Error):
51 pass
52
53
54
55 class NoInstantNodes(Error):
56 pass
57
58
59
60 class InvalidConfigurationOption(Error):
61 msg = 'Invalid configuration option'
62
63
64
65 class InvalidConfigurationValue(Error):
66 msg = 'Bad configuration value'
67
68
69
70 class NodeNotPersistent(Error):
71 pass
72
73
74
75 class NoRootNode(Error):
76 pass
77
78
79
80 class NoCallbacks(Error):
81 """
82 There are no callbacks for this node.
83 """
84
85
86
87 class NoCollections(Error):
88 pass
89
90
91
92 class NoPublishing(Error):
93 """
94 This node does not support publishing.
95 """