Module: check_mk
Branch: master
Commit: 6c5a0ec38232c31bb85356fb67c1f4fc56cc4618
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6c5a0ec38232c3…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Feb 26 11:59:58 2016 +0100
Better handling of exceptions in context icon handlers
---
web/plugins/views/painters.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/web/plugins/views/painters.py b/web/plugins/views/painters.py
index 645d296..fde0003 100644
--- a/web/plugins/views/painters.py
+++ b/web/plugins/views/painters.py
@@ -276,7 +276,12 @@ def process_multisite_icons(what, row, tags, custom_vars, toplevel):
# b) single string - the icon name (without .png)
# c) tuple - icon, title
# d) triple - icon, title, url
- result = icon['paint'](what, row, tags, custom_vars)
+ try:
+ result = icon['paint'](what, row, tags, custom_vars)
+ except Exception, e:
+ if config.debug:
+ raise
+ result = ("alert", "%s" % e)
if result == None:
continue