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.
This commit is contained in:
parent
6f5c6f5404
commit
d25202d94e
1 changed files with 2 additions and 0 deletions
|
|
@ -320,6 +320,8 @@ def _process_template_configs(name, implementation, configs, rules):
|
||||||
app.jinja_env.get_or_select_template(data["template"])
|
app.jinja_env.get_or_select_template(data["template"])
|
||||||
except TemplateNotFound:
|
except TemplateNotFound:
|
||||||
pass
|
pass
|
||||||
|
except:
|
||||||
|
_logger.exception("Error in template {}, not going to include it".format(data["template"]))
|
||||||
else:
|
else:
|
||||||
includes[template_type].append(rule["to_entry"](data))
|
includes[template_type].append(rule["to_entry"](data))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue