aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/site_render.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-02-01 16:35:41 +0100
committerBjørn Erik Pedersen <[email protected]>2024-02-01 19:53:51 +0100
commit8d42a7942ad2cc3ecff2ad90502c7e9e87da5d52 (patch)
treed5c91d1e063eb60138084b80d22073fe5a89e750 /hugolib/site_render.go
parent4174a7866b75c6ae10827cc77dbae0676af8e5eb (diff)
downloadhugo-8d42a7942ad2cc3ecff2ad90502c7e9e87da5d52.tar.gz
hugo-8d42a7942ad2cc3ecff2ad90502c7e9e87da5d52.zip
Improve nilpointer error message
Diffstat (limited to 'hugolib/site_render.go')
-rw-r--r--hugolib/site_render.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/hugolib/site_render.go b/hugolib/site_render.go
index 138530680..ef3e3aeef 100644
--- a/hugolib/site_render.go
+++ b/hugolib/site_render.go
@@ -20,6 +20,7 @@ import (
"strings"
"sync"
+ "github.com/gohugoio/hugo/common/herrors"
"github.com/gohugoio/hugo/hugolib/doctree"
"github.com/gohugoio/hugo/config"
@@ -110,7 +111,7 @@ func (s *Site) renderPages(ctx *siteRenderContext) error {
err := <-errs
if err != nil {
- return fmt.Errorf("failed to render pages: %w", err)
+ return fmt.Errorf("failed to render pages: %w", herrors.ImproveIfNilPointer(err))
}
return nil
}