Module: check_mk
Branch: master
Commit: 15bcfc3c175b8cee6ee5afd52e109581e583416c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=15bcfc3c175b8c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jul 12 09:10:23 2018 +0200
Exceptions in WATO processing now correctly result in crash reports
Change-Id: Ifd113e963650bb94cd69f12d1056f25eb067ae29
---
cmk/gui/wato/__init__.py | 63 ++++++++++++++++++------------------------------
1 file changed, 24 insertions(+), 39 deletions(-)
diff --git a/cmk/gui/wato/__init__.py b/cmk/gui/wato/__init__.py
index a238ff5..2939705 100644
--- a/cmk/gui/wato/__init__.py
+++ b/cmk/gui/wato/__init__.py
@@ -408,48 +408,33 @@ def page_handler():
show_body_start=display_options.enabled(display_options.H),
show_top_heading=display_options.enabled(display_options.T))
- try:
- if display_options.enabled(display_options.B):
- # Show contexts buttons
- html.begin_context_buttons()
- mode.buttons()
- for inmode, buttontext, target in extra_buttons:
- if inmode == current_mode:
- if hasattr(target, '__call__'):
- target = target()
- if not target:
- continue
- if '/' == target[0] or target.startswith('../') or
'://' in target:
- html.context_button(buttontext, target)
- else:
- html.context_button(buttontext,
watolib.folder_preserving_link([("mode", target)]))
- html.end_context_buttons()
-
- if not html.is_transaction() or (watolib.is_read_only_mode_enabled() and
watolib.may_override_read_only_mode()):
- show_read_only_warning()
-
- # Show outcome of action
- if html.has_user_errors():
- html.show_error(action_message)
- elif action_message:
- html.message(action_message)
-
- # Show content
- mode.handle_page()
-
- except MKGeneralException:
- raise
+ if display_options.enabled(display_options.B):
+ # Show contexts buttons
+ html.begin_context_buttons()
+ mode.buttons()
+ for inmode, buttontext, target in extra_buttons:
+ if inmode == current_mode:
+ if hasattr(target, '__call__'):
+ target = target()
+ if not target:
+ continue
+ if '/' == target[0] or target.startswith('../') or
'://' in target:
+ html.context_button(buttontext, target)
+ else:
+ html.context_button(buttontext,
watolib.folder_preserving_link([("mode", target)]))
+ html.end_context_buttons()
- except MKInternalError:
- html.unplug_all()
- raise
+ if not html.is_transaction() or (watolib.is_read_only_mode_enabled() and
watolib.may_override_read_only_mode()):
+ show_read_only_warning()
- except MKAuthException:
- raise
+ # Show outcome of action
+ if html.has_user_errors():
+ html.show_error(action_message)
+ elif action_message:
+ html.message(action_message)
- except Exception, e:
- html.unplug_all()
- html.show_error(traceback.format_exc().replace('\n', '<br
/>'))
+ # Show content
+ mode.handle_page()
if watolib.is_sidebar_reload_needed():
html.reload_sidebar()