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)
40
41
42
44 """
45 The base class for all connection related exceptions.
46 """
47 pass
48
50 """
51 Exception raised when there is an error connecting to the remote
52 peer.
53 """
54 pass
55
58
61
64
67
68
69
72
74 """
75 Exception raised when an operation is attempted that is illegal when
76 detached.
77 """
78 pass
79
81 """
82 Exception raised when commit or rollback is attempted on a non
83 transactional session.
84 """
85 pass
86
88 """Base class for transactional errors"""
89 pass
90
92 """The transaction was automatically rolled back. This could be due to an error
93 on the broker, such as a store failure, or a connection failure during the
94 transaction"""
95 pass
96
98 """ The outcome of the transaction on the broker (commit or roll-back) is not
99 known. This occurs when the connection fails after we sent the commit but
100 before we received a response."""
101 pass
102
105
108
111
112
113
116
119
122
125
128
131
134
137
140
141
142
145
148
151
152
153
156
159
161 """
162 Exception raised by L{Receiver.fetch} when there is no message
163 available within the alloted time.
164 """
165 pass
166
167
168 -class ContentError(MessagingError):
169 """
170 This type of exception will be returned to the application
171 once, and will not block further requests
172 """
173 pass
174
177
180