use fmt.Errorf instead of os.NewError(fmt.Sprintf(..))

This commit is contained in:
Brad Fitzpatrick 2011-04-03 19:58:41 -07:00
parent bcd7db4b7e
commit 87d749f781
1 changed files with 1 additions and 2 deletions

View File

@ -82,8 +82,7 @@ func (c *Client) jsonFromResponse(resp *http.Response) (map[string]interface{},
func (c *Client) Upload(h *UploadHandle) (*PutResult, os.Error) {
error := func(msg string, e os.Error) (*PutResult, os.Error) {
err := os.NewError(fmt.Sprintf("Error uploading blob %s: %s; err=%s",
h.BlobRef, msg, e))
err := fmt.Errorf("Error uploading blob %s: %s; err=%v", h.BlobRef, msg, e)
c.log.Print(err.String())
return nil, err
}