hugolib: Improve error message in .Render

This commit is contained in:
Bjørn Erik Pedersen 2018-02-13 09:01:47 +01:00
parent 0816a97a46
commit 4edb4bcc65
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -130,7 +130,7 @@ func (p *PageOutput) Render(layout ...string) template.HTML {
if templ != nil {
res, err := templ.ExecuteToString(p)
if err != nil {
helpers.DistinctErrorLog.Printf("in .Render: Failed to execute template %q for page %q", layout, p.pathOrTitle())
helpers.DistinctErrorLog.Printf("in .Render: Failed to execute template %q: %s", layout, err)
return template.HTML("")
}
return template.HTML(res)