Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(17)

Unified Diff: environs/bootstrap/synctools.go

Issue 70770043: all: use errgo instead of fmt.Errorf
Patch Set: all: use errgo instead of fmt.Errorf Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « environs/bootstrap/state.go ('k') | environs/cloudinit.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: environs/bootstrap/synctools.go
=== modified file 'environs/bootstrap/synctools.go'
--- environs/bootstrap/synctools.go 2014-01-20 23:32:00 +0000
+++ environs/bootstrap/synctools.go 2014-03-03 12:00:09 +0000
@@ -4,7 +4,7 @@
package bootstrap
import (
- "fmt"
+ errgo "github.com/juju/errgo/errors"
"launchpad.net/juju-core/environs"
"launchpad.net/juju-core/environs/config"
@@ -71,7 +71,7 @@
err = env.SetConfig(cfg)
}
if err != nil {
- return fmt.Errorf("failed to update environment configuration: %v", err)
+ return errgo.Notef(err, "failed to update environment configuration")
}
return nil
}
@@ -112,12 +112,12 @@
if syncErr != envtools.ErrNoTools {
err = syncErr
}
- return nil, fmt.Errorf("cannot find bootstrap tools: %v", err)
+ return nil, errgo.Notef(err, "cannot find bootstrap tools")
}
// TODO(axw) have syncOrUpload return the list of tools in the target, and use that.
params.AllowRetry = true
if toolsList, err = envtools.FindBootstrapTools(env, params); err != nil {
- return nil, fmt.Errorf("cannot find bootstrap tools: %v", err)
+ return nil, errgo.Notef(err, "cannot find bootstrap tools")
}
return toolsList, nil
}
« no previous file with comments | « environs/bootstrap/state.go ('k') | environs/cloudinit.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b