code: func (p *pageState) wrapError(err error) error {
  
  	var filename string
  	if !p.File().IsZero() {
  		filename = p.File().Filename()
  	}
  
  	err, _ = herrors.WithFileContextForFile(
  		err,
  		filename,
  		filename,
  		p.s.SourceSpec.Fs.Source,
  		herrors.SimpleLineMatcher)
  
  	return err
  }
docs: // wrapError adds some more context to the given error if possible