11 def __str__(self): |
11 def __str__(self): |
12 return "%i:%s"%(self.code,self.msg) |
12 return "%i:%s"%(self.code,self.msg) |
13 |
13 |
14 class UserNotFound(InterfaceException): |
14 class UserNotFound(InterfaceException): |
15 def __init__(self): |
15 def __init__(self): |
16 InterfaceException.__init__(self, 901, u"Der API-Key ist ungültig.") |
16 InterfaceException.__init__(self, 901, "API-Key is unknown.") |
17 |
17 |
18 class JobNotFound(InterfaceException): |
18 class JobNotFound(InterfaceException): |
19 def __init__(self): |
19 def __init__(self): |
20 InterfaceException.__init__(self, 902, u"Die Jobid ist ungültig.") |
20 InterfaceException.__init__(self, 902, "Jobid is unknown.") |
21 |
21 |
22 class ExternalException(InterfaceException): |
22 class ExternalException(InterfaceException): |
23 def __init__(self): |
23 def __init__(self): |
24 InterfaceException.__init__(self, 950, "Fehler in externer API.") |
24 InterfaceException.__init__(self, 950, "Error in external API.") |
25 |
25 |
26 class ValidateException(Exception): |
26 class ValidateException(Exception): |
27 def __init__(self, code=700, field=None, msg=None): |
27 def __init__(self, code=700, field=None, msg=None): |
28 self.code=code |
28 self.code=code |
29 self.field=field |
29 self.field=field |