mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-23 21:53:09 +02:00
Print template parsing errors to aid troubleshooting
Added a new Template.PrintErrors() function call, used in hugolib/site.go#Process() so it does not clutter up `go test -v ./...` results. Special thanks to @tatsushid for mapping out the call trace which makes it a lot easier to find the appropriate places to place the Template.PrintErrors() call. Fixes #316
This commit is contained in:
@@ -269,6 +269,7 @@ func (s *Site) Process() (err error) {
|
||||
return
|
||||
}
|
||||
s.prepTemplates()
|
||||
s.Tmpl.PrintErrors()
|
||||
s.timerStep("initialize & template prep")
|
||||
if err = s.CreatePages(); err != nil {
|
||||
return
|
||||
|
Reference in New Issue
Block a user