Better error message for data-file parsing errors
authorbep <bjorn.erik.pedersen@gmail.com>
Mon, 9 Feb 2015 15:07:30 +0000 (16:07 +0100)
committerbep <bjorn.erik.pedersen@gmail.com>
Mon, 9 Feb 2015 15:07:30 +0000 (16:07 +0100)
hugolib/site.go

index a91eefcbc20231f84df6051b9b0dbb7639d74c09..c95b48611223b27924199a7d64ecb74df1010bea 100644 (file)
@@ -285,7 +285,7 @@ func (s *Site) loadData(fs source.Input) (err error) {
 
                data, err := readData(r)
                if err != nil {
-                       return err
+                       return fmt.Errorf("Failed to read data from %s: %s", filepath.Join(r.Path(), r.LogicalName()), err)
                }
 
                // Copy content from current to data when needed