web/_exceptions.py
branchstable
changeset 5186 f3c2cb460ad9
parent 4252 6c4f109c2b03
child 5223 6abd6e3599f4
child 5377 84d14ddfae13
equal deleted inserted replaced
5185:92376b009b98 5186:f3c2cb460ad9
    51 
    51 
    52 class RemoteCallFailed(RequestError):
    52 class RemoteCallFailed(RequestError):
    53     """raised when a json remote call fails
    53     """raised when a json remote call fails
    54     """
    54     """
    55     def __init__(self, reason=''):
    55     def __init__(self, reason=''):
    56         #super(RequestError, self).__init__() # XXX require py >= 2.5
    56         super(RequestError, self).__init__()
    57         RequestError.__init__(self)
       
    58         self.reason = reason
    57         self.reason = reason
    59 
    58 
    60     def dumps(self):
    59     def dumps(self):
    61         import simplejson
    60         import simplejson
    62         return simplejson.dumps({'reason': self.reason})
    61         return simplejson.dumps({'reason': self.reason})