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: |