Mercurial > libervia-pubsub
annotate idavoll/error.py @ 199:569e4dac9bc3
Adjust spacing to match Twisted's.
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Tue, 10 Jun 2008 11:38:35 +0000 |
parents | bc269696ef42 |
children | b4bf0a5ce50d |
rev | line source |
---|---|
171
bc269696ef42
Reply with the correct error condition on subscription when not subscribed.
Ralph Meijer <ralphm@ik.nu>
parents:
167
diff
changeset
|
1 # Copyright (c) 2003-2008 Ralph Meijer |
167
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
2 # See LICENSE for details. |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
3 |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
4 class Error(Exception): |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
5 msg = '' |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
6 |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
7 def __str__(self): |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
8 return self.msg |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
9 |
199
569e4dac9bc3
Adjust spacing to match Twisted's.
Ralph Meijer <ralphm@ik.nu>
parents:
171
diff
changeset
|
10 |
167
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
11 class NodeNotFound(Error): |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
12 pass |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
13 |
199
569e4dac9bc3
Adjust spacing to match Twisted's.
Ralph Meijer <ralphm@ik.nu>
parents:
171
diff
changeset
|
14 |
167
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
15 class NodeExists(Error): |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
16 pass |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
17 |
199
569e4dac9bc3
Adjust spacing to match Twisted's.
Ralph Meijer <ralphm@ik.nu>
parents:
171
diff
changeset
|
18 |
171
bc269696ef42
Reply with the correct error condition on subscription when not subscribed.
Ralph Meijer <ralphm@ik.nu>
parents:
167
diff
changeset
|
19 class NotSubscribed(Error): |
bc269696ef42
Reply with the correct error condition on subscription when not subscribed.
Ralph Meijer <ralphm@ik.nu>
parents:
167
diff
changeset
|
20 """ |
bc269696ef42
Reply with the correct error condition on subscription when not subscribed.
Ralph Meijer <ralphm@ik.nu>
parents:
167
diff
changeset
|
21 Entity is not subscribed to this node. |
bc269696ef42
Reply with the correct error condition on subscription when not subscribed.
Ralph Meijer <ralphm@ik.nu>
parents:
167
diff
changeset
|
22 """ |
167
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
23 |
199
569e4dac9bc3
Adjust spacing to match Twisted's.
Ralph Meijer <ralphm@ik.nu>
parents:
171
diff
changeset
|
24 |
167
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
25 class SubscriptionExists(Error): |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
26 pass |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
27 |
199
569e4dac9bc3
Adjust spacing to match Twisted's.
Ralph Meijer <ralphm@ik.nu>
parents:
171
diff
changeset
|
28 |
167
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
29 class Forbidden(Error): |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
30 pass |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
31 |
199
569e4dac9bc3
Adjust spacing to match Twisted's.
Ralph Meijer <ralphm@ik.nu>
parents:
171
diff
changeset
|
32 |
167
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
33 class ItemForbidden(Error): |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
34 pass |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
35 |
199
569e4dac9bc3
Adjust spacing to match Twisted's.
Ralph Meijer <ralphm@ik.nu>
parents:
171
diff
changeset
|
36 |
167
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
37 class ItemRequired(Error): |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
38 pass |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
39 |
199
569e4dac9bc3
Adjust spacing to match Twisted's.
Ralph Meijer <ralphm@ik.nu>
parents:
171
diff
changeset
|
40 |
167
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
41 class NoInstantNodes(Error): |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
42 pass |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
43 |
199
569e4dac9bc3
Adjust spacing to match Twisted's.
Ralph Meijer <ralphm@ik.nu>
parents:
171
diff
changeset
|
44 |
167
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
45 class InvalidConfigurationOption(Error): |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
46 msg = 'Invalid configuration option' |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
47 |
199
569e4dac9bc3
Adjust spacing to match Twisted's.
Ralph Meijer <ralphm@ik.nu>
parents:
171
diff
changeset
|
48 |
167
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
49 class InvalidConfigurationValue(Error): |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
50 msg = 'Bad configuration value' |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
51 |
199
569e4dac9bc3
Adjust spacing to match Twisted's.
Ralph Meijer <ralphm@ik.nu>
parents:
171
diff
changeset
|
52 |
167
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
53 class NodeNotPersistent(Error): |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
54 pass |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
55 |
199
569e4dac9bc3
Adjust spacing to match Twisted's.
Ralph Meijer <ralphm@ik.nu>
parents:
171
diff
changeset
|
56 |
167
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
57 class NoRootNode(Error): |
ef22e4150caa
Move protocol implementations (pubsub, disco, forms) to and depend on wokkel.
Ralph Meijer <ralphm@ik.nu>
parents:
diff
changeset
|
58 pass |