aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/page.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-02-01 08:18:11 +0100
committerBjørn Erik Pedersen <[email protected]>2024-02-01 08:18:11 +0100
commit1891d5e6b5575e3abb7e0f80c3fbce1670f9bd5e (patch)
tree48ff8aa0174826fcc248404a3c6303a3ff710773 /hugolib/page.go
parent156f08de351a3148f59fd010930d33d5ffaabf43 (diff)
downloadhugo-1891d5e6b5575e3abb7e0f80c3fbce1670f9bd5e.tar.gz
hugo-1891d5e6b5575e3abb7e0f80c3fbce1670f9bd5e.zip
hugolib: Add some more details to the "paginator not supported" error
See #11949
Diffstat (limited to 'hugolib/page.go')
-rw-r--r--hugolib/page.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/hugolib/page.go b/hugolib/page.go
index 822b7c021..10ecdcad2 100644
--- a/hugolib/page.go
+++ b/hugolib/page.go
@@ -553,6 +553,14 @@ func (p *pageState) wrapError(err error) error {
return p.m.wrapError(err, p.s.h.SourceFs)
}
+func (p *pageState) getPageInfoForError() string {
+ s := fmt.Sprintf("kind: %q, path: %q", p.Kind(), p.Path())
+ if p.File() != nil {
+ s += fmt.Sprintf(", file: %q", p.File().Filename())
+ }
+ return s
+}
+
func (p *pageState) getContentConverter() converter.Converter {
var err error
p.contentConverterInit.Do(func() {