better error messages for template errors

This commit is contained in:
spf13 2014-10-02 13:37:38 -04:00
parent 3f59abe885
commit e3d4d40d32

View file

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