1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
22
23
24
26
27 - def __init__(self, code=None, text=None, **info):
28 self.code = code
29 self.text = text
30 self.info = info
31 if self.code is None:
32 msg = self.text
33 else:
34 msg = "%s(%s)" % (self.text, self.code)
35 if info:
36 msg += " " + ", ".join(["%s=%r" % (k, v) for k, v in self.info.items()])
37 Exception.__init__(self, msg)
38
41
42
43
45 """
46 The base class for all connection related exceptions.
47 """
48 pass
49
51 """
52 Exception raised when there is an error connecting to the remote
53 peer.
54 """
55 pass
56
59
62
65
68
69
70
73
75 """
76 Exception raised when an operation is attempted that is illegal when
77 detached.
78 """
79 pass
80
82 """
83 Exception raised when commit or rollback is attempted on a non
84 transactional session.
85 """
86 pass
87
90
93
96
99
102
103
104
107
110
113
116
119
122
125
128
131
132
133
136
139
142
143
144
147
150
152 """
153 Exception raised by L{Receiver.fetch} when there is no message
154 available within the alloted time.
155 """
156 pass
157