better error

This commit is contained in:
Mark Bates 2019-12-03 17:40:04 -05:00
parent 0167919fce
commit 6431634511
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
package pkgutil
import (
"fmt"
"io"
"os"
"strings"
@ -29,7 +30,7 @@ func Stuff(w io.Writer, c here.Info, decls parser.Decls) error {
}
df, err := os.Open(pf.Abs)
if err != nil {
return err
return fmt.Errorf("could open stuff %s: %s", pf.Abs, err)
}
defer df.Close()