equal
deleted
inserted
replaced
196 ctrl._edited_entity.complete() |
196 ctrl._edited_entity.complete() |
197 try: |
197 try: |
198 req.cnx.commit() # ValidationError may be raise on commit |
198 req.cnx.commit() # ValidationError may be raise on commit |
199 except ValidationError, ex: |
199 except ValidationError, ex: |
200 return (False, _validation_error(req, ex), ctrl._edited_entity) |
200 return (False, _validation_error(req, ex), ctrl._edited_entity) |
|
201 except Exception, ex: |
|
202 req.cnx.rollback() |
|
203 req.exception('unexpected error while validating form') |
|
204 return (False, req._(str(ex).decode('utf-8')), ctrl._edited_entity) |
201 else: |
205 else: |
202 return (True, ex.location, ctrl._edited_entity) |
206 return (True, ex.location, ctrl._edited_entity) |
203 except Exception, ex: |
207 except Exception, ex: |
204 req.cnx.rollback() |
208 req.cnx.rollback() |
205 req.exception('unexpected error while validating form') |
209 req.exception('unexpected error while validating form') |