web/application.py
changeset 6279 42079f752a9c
parent 6139 f76599a96238
parent 6273 8dbdd4cc7938
child 6333 e3994fcc21c3
equal deleted inserted replaced
6229:c4a70a5dd144 6279:42079f752a9c
   418                 raise StatusResponse(404, self.notfound_content(req))
   418                 raise StatusResponse(404, self.notfound_content(req))
   419             except ValidationError, ex:
   419             except ValidationError, ex:
   420                 self.validation_error_handler(req, ex)
   420                 self.validation_error_handler(req, ex)
   421             except (Unauthorized, BadRQLQuery, RequestError), ex:
   421             except (Unauthorized, BadRQLQuery, RequestError), ex:
   422                 self.error_handler(req, ex, tb=False)
   422                 self.error_handler(req, ex, tb=False)
   423             except Exception, ex:
   423             except BaseException, ex:
   424                 self.error_handler(req, ex, tb=True)
   424                 self.error_handler(req, ex, tb=True)
   425             except:
   425             except:
   426                 self.critical('Catch all triggered!!!')
   426                 self.critical('Catch all triggered!!!')
   427                 self.exception('this is what happened')
   427                 self.exception('this is what happened')
       
   428                 result = 'oops'
   428         finally:
   429         finally:
   429             if req.cnx and not commited:
   430             if req.cnx and not commited:
   430                 try:
   431                 try:
   431                     req.cnx.rollback()
   432                     req.cnx.rollback()
   432                 except:
   433                 except: