mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
@@ -347,10 +347,14 @@ func (h *HugoSites) render(l logg.LevelLogger, config *BuildCfg) error {
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
if strings.Contains(err.Error(), "can't evaluate field Err in type resource.Resource") {
|
||||
// In Hugo 0.141.0 we replaced the special error handling for resources.GetRemote
|
||||
// with the more general try.
|
||||
return fmt.Errorf("%s: Resource.Err was removed in Hugo v0.141.0 and replaced with a new try keyword, see https://gohugo.io/functions/go-template/try/", err)
|
||||
// In Hugo 0.141.0 we replaced the special error handling for resources.GetRemote
|
||||
// with the more general try.
|
||||
if strings.Contains(err.Error(), "can't evaluate field Err in type") {
|
||||
if strings.Contains(err.Error(), "resource.Resource") {
|
||||
return fmt.Errorf("%s: Resource.Err was removed in Hugo v0.141.0 and replaced with a new try keyword, see https://gohugo.io/functions/go-template/try/", err)
|
||||
} else if strings.Contains(err.Error(), "template.HTML") {
|
||||
return fmt.Errorf("%s: the return type of transform.ToMath was changed in Hugo v0.141.0 and the error handling replaced with a new try keyword, see https://gohugo.io/functions/go-template/try/", err)
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user