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

Unified Diff: environs/sync/sync.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/storage/storage_test.go ('k') | environs/testing/storage.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: environs/sync/sync.go
=== modified file 'environs/sync/sync.go'
--- environs/sync/sync.go 2014-01-30 14:11:27 +0000
+++ environs/sync/sync.go 2014-03-03 12:00:09 +0000
@@ -5,13 +5,13 @@
import (
"bytes"
- "fmt"
"io"
"io/ioutil"
"net/http"
"os"
"path/filepath"
+ "github.com/juju/errgo/errors"
"github.com/loggo/loggo"
"launchpad.net/juju-core/environs/filestorage"
@@ -212,7 +212,7 @@
}
fileInfo, err := f.Stat()
if err != nil {
- return nil, fmt.Errorf("cannot stat newly made tools archive: %v", err)
+ return nil, errors.Notef(err, "cannot stat newly made tools archive")
}
size := fileInfo.Size()
logger.Infof("built tools %v (%dkB)", toolsVersion, (size+512)/1024)
« no previous file with comments | « environs/storage/storage_test.go ('k') | environs/testing/storage.go » ('j') | no next file with comments »

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