Module: check_mk
Branch: master
Commit: 294bdfa3eb35ed05ca0a24bf7dc63de87dfb91b9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=294bdfa3eb35ed…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Tue Jun 14 15:41:49 2016 +0200
don't throw away the most interesting part of an exception
---
web/htdocs/sidebar.py | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py
index d0c7c87..e35e325 100644
--- a/web/htdocs/sidebar.py
+++ b/web/htdocs/sidebar.py
@@ -370,12 +370,9 @@ def render_snapin(name, state):
return refresh_url
def snapin_exception(e):
- if config.debug:
- raise e
- else:
- html.write("<div class=snapinexception>\n"
- "<h2>%s</h2>\n"
- "<p>%s</p></div>" % (_('Error'), e))
+ html.write("<div class=snapinexception>\n"
+ "<h2>%s</h2>\n"
+ "<p>%s</p></div>" % (_('Error'), e))
def ajax_fold():
config = load_user_config()
@@ -430,6 +427,8 @@ def ajax_snapin():
try:
snapin["render"]()
except Exception, e:
+ if config.debug:
+ raise
snapin_exception(e)
snapin_code.append(html.drain())