mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-25 14:30:49 +00:00
parent
0e44f75ebd
commit
ddc8cc0082
2 changed files with 3 additions and 5 deletions
|
@ -42,10 +42,10 @@ type HandledResult struct {
|
|||
func (h HandledResult) Error() string {
|
||||
if h.err != nil {
|
||||
if h.page != nil {
|
||||
return "Error:" + h.err.Error() + " for " + h.page.File.LogicalName()
|
||||
return "Error: " + h.err.Error() + " for " + h.page.File.LogicalName()
|
||||
}
|
||||
if h.file != nil {
|
||||
return "Error:" + h.err.Error() + " for " + h.file.LogicalName()
|
||||
return "Error: " + h.err.Error() + " for " + h.file.LogicalName()
|
||||
}
|
||||
}
|
||||
return h.err.Error()
|
||||
|
|
|
@ -1394,9 +1394,7 @@ func (p *Page) parse(reader io.Reader) error {
|
|||
meta, err := psr.Metadata()
|
||||
if meta != nil {
|
||||
if err != nil {
|
||||
p.s.Log.ERROR.Printf("Error parsing page meta data for %s", p.File.Path())
|
||||
p.s.Log.ERROR.Println(err)
|
||||
return err
|
||||
return fmt.Errorf("failed to parse page metadata for %s: %s", p.File.Path(), err)
|
||||
}
|
||||
if err = p.update(meta); err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue