From d25202d94ef4bb323184471968668685f752001c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 24 Jul 2015 12:14:00 +0200 Subject: [PATCH] Capture compilation errors on additional templates Shouldn't cause the whole page not to render but log an error. Should provide more resilience against bad plugins. --- src/octoprint/server/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/octoprint/server/views.py b/src/octoprint/server/views.py index dc278060..0c980543 100644 --- a/src/octoprint/server/views.py +++ b/src/octoprint/server/views.py @@ -320,6 +320,8 @@ def _process_template_configs(name, implementation, configs, rules): app.jinja_env.get_or_select_template(data["template"]) except TemplateNotFound: pass + except: + _logger.exception("Error in template {}, not going to include it".format(data["template"])) else: includes[template_type].append(rule["to_entry"](data))