1
2
3
4
5
6
7
9 """ Markup base class for well-behaved exception that should not print the whole traceback to user's prompt
10 Any subclass of this exception is handled by a custom IPython exception handler
11 and is printed out in an usable format to iPython prompt
12 """
13
17
19 """
20 String representation of this class
21 """
22 _str = "%s: " % self.__class__.__name__
23 if hasattr(self,'args') and self.args:
24 _str +=" %s" % str(self.args)
25 if hasattr(self,'kwds') and self.kwds:
26 _str +=" %s" % str(self.kwds)
27 return _str
28
34
36 if self.excpt:
37 e = '(%s:%s)'%(str(type(self.excpt)),str(self.excpt))
38 else:
39 e = ''
40 return "ApplicationConfigurationError: %s %s"%(self.message,e)
41
43 - def __init__(self,backend_name,message):
44 GangaException.__init__(self,backend_name,message)
45 self.backend_name = backend_name
46 self.message = message
47
49 return "BackendError: %s (%s backend) "%(self.message,self.backend_name)
50
51
52
54 """
55 For non-bulk operations this exception may contain an original
56 exception 'e' raised by the DB client.
57 """
58 - def __init__(self, e = None, msg = None, details = None):
64
67
68
69
71 """
72 For bulk operations this exception
73 have a non-empty dictionary 'details'
74 which contains ids of failed jobs as keys and 'original' exceptions as values.
75 """
76 - def __init__(self, details = None, msg = None):
82
85
87 return self.details.get(id)
88
92
96
101
103 return "JobManagerError: %s" % str(self.msg)
104
107
110
112 'Attribute is read-only and may not be modified by the user (for example job.id)'
114
115
117 'Object cannot be modified (for example job in a submitted state)'
119
120
123
124
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178