From 094998e9bb3ba03d795350529e2faa18ca26063b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 11 Sep 2015 18:19:13 +0200 Subject: [PATCH] backoffice: notify admins in case of spurious exception (#8247) --- wcs/forms/common.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wcs/forms/common.py b/wcs/forms/common.py index d1a1526..a674a01 100644 --- a/wcs/forms/common.py +++ b/wcs/forms/common.py @@ -14,6 +14,8 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, see . +import sys + from quixote import get_publisher, get_request, get_response, get_session, redirect from quixote.directory import Directory from quixote.html import TemplateIO, htmltext @@ -423,7 +425,8 @@ class FormStatusPage(Directory): form = self.filled.get_workflow_form(user) except: # XXX: probably because there are mixed forms, with and without - # workflows + # workflow; send a trace nevertheless. + get_publisher().notify_of_exception(sys.exc_info(), context='[BACKOFFICE]') form = Form() if form and form.is_submitted() and not form.has_errors(): -- 2.5.1