From 46403b8d0a6fb4de56b16bc1c41d62263304e2bc Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Fri, 17 Feb 2017 00:23:41 -0800 Subject: [PATCH] Iterate through Tera error chain for better errors. --- contrib/src/templates/tera_templates.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/src/templates/tera_templates.rs b/contrib/src/templates/tera_templates.rs index 20a9783f..2e7e440d 100644 --- a/contrib/src/templates/tera_templates.rs +++ b/contrib/src/templates/tera_templates.rs @@ -56,7 +56,11 @@ pub fn render(name: &str, _: &TemplateInfo, context: &T) -> Option match tera.value_render(name, context) { Ok(string) => Some(string), Err(e) => { - error_!("Error rendering Tera template '{}': {}", name, e); + error_!("Error rendering Tera template '{}'.", name); + for error in e.iter().skip(1) { + error_!("{}.", error); + } + None } }