예제 #1
0
 def __init__(self, message=None):
     super(HTTPException, self).__init__(message)
     try:
         log.error("exception: {}".format(message))
         self.error = jsonutils.loads(message)
     except Exception:
         self.error = {'error':
                       {'message': self.message or self.__class__.__doc__}}
예제 #2
0
 def __init__(self, message=None):
     super(HTTPException, self).__init__(message)
     try:
         log.error("exception: {}".format(message))
         self.error = jsonutils.loads(message)
     except Exception:
         self.error = {
             'error': {
                 'message': self.message or self.__class__.__doc__
             }
         }
예제 #3
0
 def json(self):
     return jsonutils.loads(self.content)
예제 #4
0
 def json(self):
     return jsonutils.loads(self.content)