From: spf13 Date: Thu, 2 Oct 2014 17:37:38 +0000 (-0400) Subject: better error messages for template errors X-Git-Tag: v0.13~398 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e3d4d40d;p=brevno-suite%2Fhugo better error messages for template errors --- diff --git a/hugolib/template.go b/hugolib/template.go index d2cfccf3..0b7f5e7d 100644 --- a/hugolib/template.go +++ b/hugolib/template.go @@ -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 }