# HG changeset patch # User Sylvain Thénault # Date 1254842183 -7200 # Node ID 54743fc6172c159b34d05fd4cbae773f9b8502f0 # Parent c31de6ea6984de0343906b3e7c1c57ae9631fd13 [json validation] catch everything here diff -r c31de6ea6984 -r 54743fc6172c web/views/basecontrollers.py --- a/web/views/basecontrollers.py Tue Oct 06 17:15:24 2009 +0200 +++ b/web/views/basecontrollers.py Tue Oct 06 17:16:23 2009 +0200 @@ -198,6 +198,10 @@ req.cnx.commit() # ValidationError may be raise on commit except ValidationError, ex: return (False, _validation_error(req, ex), ctrl._edited_entity) + except Exception, ex: + req.cnx.rollback() + req.exception('unexpected error while validating form') + return (False, req._(str(ex).decode('utf-8')), ctrl._edited_entity) else: return (True, ex.location, ctrl._edited_entity) except Exception, ex: