Print file name in file error messages

This commit is contained in:
Draylar 2020-10-18 16:00:59 -05:00
parent 61d92c5673
commit 36d707e622

View File

@ -114,13 +114,13 @@ var exportCmd = &cobra.Command{
} }
modFile, err := exp.Create(filepath.ToSlash(filepath.Join("overrides", path))) modFile, err := exp.Create(filepath.ToSlash(filepath.Join("overrides", path)))
if err != nil { if err != nil {
fmt.Printf("Error creating mod file: %s\n", err.Error()) fmt.Printf("Error creating mod file %s: %s\n", path, err.Error())
// TODO: exit(1)? // TODO: exit(1)?
continue continue
} }
err = mod.DownloadFile(modFile) err = mod.DownloadFile(modFile)
if err != nil { if err != nil {
fmt.Printf("Error downloading mod file: %s\n", err.Error()) fmt.Printf("Error downloading mod file %s: %s\n", path, err.Error())
// TODO: exit(1)? // TODO: exit(1)?
continue continue
} }
@ -237,7 +237,7 @@ func loadMods(index core.Index) []core.Mod {
for _, v := range modPaths { for _, v := range modPaths {
modData, err := core.LoadMod(v) modData, err := core.LoadMod(v)
if err != nil { if err != nil {
fmt.Printf("Error reading mod file: %s\n", err.Error()) fmt.Printf("Error reading mod file %s: %s\n", v, err.Error())
// TODO: exit(1)? // TODO: exit(1)?
continue continue
} }