From 5f0583eb049892f9795be1fc66134842c37ff88a Mon Sep 17 00:00:00 2001 From: Laurentiu Nicola Date: Tue, 25 Jul 2017 21:52:04 +0300 Subject: [PATCH] Don't skip over the first Tera error. The first line in the Tera error messages is sometimes less useful, but in other cases, like when the context is not a map or struct, contains the complete description. As such, always include it, even if the output is slightly uglier. Also don't append periods at the end since some Tera messages already have them. --- contrib/src/templates/tera_templates.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/src/templates/tera_templates.rs b/contrib/src/templates/tera_templates.rs index f4fb9892..1351d3e7 100644 --- a/contrib/src/templates/tera_templates.rs +++ b/contrib/src/templates/tera_templates.rs @@ -41,8 +41,8 @@ impl Engine for Tera { Ok(string) => Some(string), Err(e) => { error_!("Error rendering Tera template '{}'.", name); - for error in e.iter().skip(1) { - error_!("{}.", error); + for error in e.iter() { + error_!("{}", error); } None