mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-27 03:23:55 +00:00
better error messages for template errors
This commit is contained in:
parent
3f59abe885
commit
e3d4d40d32
1 changed files with 4 additions and 1 deletions
|
@ -434,7 +434,10 @@ func ExecuteTemplate(context interface{}, layouts ...string) *bytes.Buffer {
|
|||
worked := false
|
||||
for _, layout := range layouts {
|
||||
if localTemplates.Lookup(layout) != nil {
|
||||
localTemplates.ExecuteTemplate(buffer, layout, context)
|
||||
err := localTemplates.ExecuteTemplate(buffer, layout, context)
|
||||
if err != nil {
|
||||
jww.ERROR.Println(err, "in", layout)
|
||||
}
|
||||
worked = true
|
||||
break
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue