[web controller] don't try to translate arbitrary exception message stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 12 Aug 2010 18:49:20 +0200
branchstable
changeset 6107 05061eda1fa7
parent 6106 1e6d93f70d14
child 6108 c459ffa5fa6f
[web controller] don't try to translate arbitrary exception message
web/views/basecontrollers.py
--- a/web/views/basecontrollers.py	Thu Aug 12 16:50:52 2010 +0200
+++ b/web/views/basecontrollers.py	Thu Aug 12 18:49:20 2010 +0200
@@ -221,7 +221,7 @@
         except Exception, ex:
             req.cnx.rollback()
             req.exception('unexpected error while validating form')
-            return (False, req._(str(ex).decode('utf-8')), ctrl._edited_entity)
+            return (False, str(ex).decode('utf-8'), ctrl._edited_entity)
         else:
             # complete entity: it can be used in js callbacks where we might
             # want every possible information
@@ -231,7 +231,7 @@
     except Exception, ex:
         req.cnx.rollback()
         req.exception('unexpected error while validating form')
-        return (False, req._(str(ex).decode('utf-8')), ctrl._edited_entity)
+        return (False, str(ex).decode('utf-8'), ctrl._edited_entity)
     return (False, '???', None)