From: Peter Amstutz Date: Fri, 14 Sep 2018 15:39:26 +0000 (-0400) Subject: 14203: Tweak error messages. X-Git-Tag: 1.3.0~110^2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/6ab0abd1ba40262a6bca12dfdd58e3701b274028 14203: Tweak error messages. Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- diff --git a/services/crunch-run/copier.go b/services/crunch-run/copier.go index 4a6253c459..3f529f6313 100644 --- a/services/crunch-run/copier.go +++ b/services/crunch-run/copier.go @@ -70,22 +70,22 @@ type copier struct { func (cp *copier) Copy() (string, error) { err := cp.walkMount("", cp.ctrOutputDir, limitFollowSymlinks, true) if err != nil { - return "", fmt.Errorf("in walkMount: %v", err) + return "", fmt.Errorf("error scanning files to copy to output: %v", err) } fs, err := (&arvados.Collection{ManifestText: cp.manifest}).FileSystem(cp.client, cp.keepClient) if err != nil { - return "", fmt.Errorf("creating Collection.FileSystem: %v", err) + return "", fmt.Errorf("error creating Collection.FileSystem: %v", err) } for _, d := range cp.dirs { err = fs.Mkdir(d, 0777) if err != nil && err != os.ErrExist { - return "", fmt.Errorf("Could not Mkdir %v: %v", d, err) + return "", fmt.Errorf("error making directory %q in output collection: %v", d, err) } } for _, f := range cp.files { err = cp.copyFile(fs, f) if err != nil { - return "", fmt.Errorf("Could not copyFile %v: %v", f, err) + return "", fmt.Errorf("error copying file %q into output collection: %v", f, err) } } return fs.MarshalManifest(".") diff --git a/services/crunch-run/crunchrun.go b/services/crunch-run/crunchrun.go index df7b68833a..730194b825 100644 --- a/services/crunch-run/crunchrun.go +++ b/services/crunch-run/crunchrun.go @@ -1428,11 +1428,11 @@ func (runner *ContainerRunner) Run() (err error) { // hasn't already been assigned when Run() returns, // this cleanup func will cause Run() to return the // first non-nil error that is passed to checkErr(). - checkErr := func(prefix string, e error) { + checkErr := func(errorIn string, e error) { if e == nil { return } - runner.CrunchLog.Printf("%s error: %v", prefix, e) + runner.CrunchLog.Printf("error in %s: %v", errorIn, e) if err == nil { err = e }