blob: 9290cf7b78e7d167894bc27e3923d01c2ebc17c4 [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)
Jay Pipes7f757632011-12-02 15:53:32 -050019
20
21class AuthenticationFailure(Exception):
22 msg = ("Authentication with user %(user)s and password "
23 "%(password)s failed.")
24 def __init__(self, **kwargs):
25 self.message = self.msg % kwargs