blob: d9babb232d754b745f10bcc491b4cb86f480bccc [file] [log] [blame]
Daryl Walleck1465d612011-11-02 02:22:15 -05001class TimeoutException(Exception):
Daryl Wallecke5b83d42011-11-10 14:39:02 -06002 """Exception on timeout"""
Daryl Walleck1465d612011-11-02 02:22:15 -05003 def __repr__(self):
4 return "Request timed out"
5
6
7class BuildErrorException(Exception):
Daryl Wallecke5b83d42011-11-10 14:39:02 -06008 """Exception on server build"""
Daryl Walleck1465d612011-11-02 02:22:15 -05009 def __repr__(self):
10 return "Server failed into error status"
Daryl Walleckadea1fa2011-11-15 18:36:39 -060011
12
13class BadRequest(Exception):
14 def __init__(self, message):
15 self.message = message
16
17 def __str__(self):
18 return repr(self.message)
Brian Lamar12d9b292011-12-08 12:41:21 -050019
20
Jay Pipes7f757632011-12-02 15:53:32 -050021class AuthenticationFailure(Exception):
22 msg = ("Authentication with user %(user)s and password "
23 "%(password)s failed.")
Brian Lamar12d9b292011-12-08 12:41:21 -050024
Jay Pipes7f757632011-12-02 15:53:32 -050025 def __init__(self, **kwargs):
26 self.message = self.msg % kwargs
Daryl Wallecked8bef32011-12-05 23:02:08 -060027
28
29class OverLimit(Exception):
30 def __init__(self, message):
31 self.message = message
32
33 def __str__(self):
34 return repr(self.message)