web/_exceptions.py
changeset 9984 793377697c81
parent 9791 32047f5f08ba
parent 9921 8227358aa983
child 10604 d4bf85db41f2
equal deleted inserted replaced
9979:9ccdb3751fbe 9984:793377697c81
    99 
    99 
   100 class RemoteCallFailed(RequestError):
   100 class RemoteCallFailed(RequestError):
   101     """raised when a json remote call fails
   101     """raised when a json remote call fails
   102     """
   102     """
   103     def __init__(self, reason='', status=httplib.INTERNAL_SERVER_ERROR):
   103     def __init__(self, reason='', status=httplib.INTERNAL_SERVER_ERROR):
   104         super(RemoteCallFailed, self).__init__(status=status)
   104         super(RemoteCallFailed, self).__init__(reason, status=status)
   105         self.reason = reason
   105         self.reason = reason
   106 
   106 
   107     def dumps(self):
   107     def dumps(self):
   108         return json_dumps({'reason': self.reason})
   108         return json_dumps({'reason': self.reason})