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.
This commit is contained in:
Laurentiu Nicola 2017-07-25 21:52:04 +03:00 committed by Sergio Benitez
parent b276e1d51f
commit 5f0583eb04
1 changed files with 2 additions and 2 deletions

View File

@ -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