mirror of
https://github.com/gohugoio/hugo.git
synced 2025-03-19 20:34:54 +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
|
worked := false
|
||||||
for _, layout := range layouts {
|
for _, layout := range layouts {
|
||||||
if localTemplates.Lookup(layout) != nil {
|
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
|
worked = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue