[web app] only log tb when explicitly asked stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 13 Jul 2012 14:29:52 +0200
branchstable
changeset 8466 92c668170ef9
parent 8465 12da4415aff0
child 8467 ad75430a2dc8
[web app] only log tb when explicitly asked
web/application.py
--- a/web/application.py	Thu Jul 12 13:42:27 2012 +0200
+++ b/web/application.py	Fri Jul 13 14:29:52 2012 +0200
@@ -1,4 +1,4 @@
-# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
 #
 # This file is part of CubicWeb.
@@ -406,8 +406,6 @@
                     content = self.need_login_content(req)
         return content
 
-
-
     def core_handle(self, req, path):
         """method called by the main publisher to process <path>
 
@@ -524,7 +522,8 @@
 
     def error_handler(self, req, ex, tb=False):
         excinfo = sys.exc_info()
-        self.exception(repr(ex))
+        if tb:
+            self.exception(repr(ex))
         req.set_header('Cache-Control', 'no-cache')
         req.remove_header('Etag')
         req.reset_message()