Merge pull request #4476 from jaxxstorm/io-log-messaging
Change the wording of some IO errors
This commit is contained in:
commit
043f5d87d4
|
@ -180,7 +180,7 @@ func massageBlobPath(path string) (string, error) {
|
|||
// For file:// backend, ensure a relative path is resolved. fileblob only supports absolute paths.
|
||||
path, err := filepath.Abs(path)
|
||||
if err != nil {
|
||||
return "", errors.Wrap(err, "An IO error occurred during the current operation")
|
||||
return "", errors.Wrap(err, "An IO error occurred while building the absolute path")
|
||||
}
|
||||
|
||||
// Using example from https://godoc.org/gocloud.dev/blob/fileblob#example-package--OpenBucket
|
||||
|
|
|
@ -177,7 +177,7 @@ func (b *localBackend) saveStack(name tokens.QName, snap *deploy.Snapshot, sm se
|
|||
}
|
||||
byts, err := m.Marshal(chk)
|
||||
if err != nil {
|
||||
return "", errors.Wrap(err, "An IO error occurred during the current operation")
|
||||
return "", errors.Wrap(err, "An IO error occurred while marshalling the checkpoint")
|
||||
}
|
||||
|
||||
// Back up the existing file if it already exists.
|
||||
|
@ -185,7 +185,7 @@ func (b *localBackend) saveStack(name tokens.QName, snap *deploy.Snapshot, sm se
|
|||
|
||||
// And now write out the new snapshot file, overwriting that location.
|
||||
if err = b.bucket.WriteAll(context.TODO(), file, byts, nil); err != nil {
|
||||
return "", errors.Wrap(err, "An IO error occurred during the current operation")
|
||||
return "", errors.Wrap(err, "An IO error occurred while writing the new snapshot file")
|
||||
}
|
||||
|
||||
logging.V(7).Infof("Saved stack %s checkpoint to: %s (backup=%s)", name, file, bck)
|
||||
|
@ -193,7 +193,7 @@ func (b *localBackend) saveStack(name tokens.QName, snap *deploy.Snapshot, sm se
|
|||
// And if we are retaining historical checkpoint information, write it out again
|
||||
if cmdutil.IsTruthy(os.Getenv("PULUMI_RETAIN_CHECKPOINTS")) {
|
||||
if err = b.bucket.WriteAll(context.TODO(), fmt.Sprintf("%v.%v", file, time.Now().UnixNano()), byts, nil); err != nil {
|
||||
return "", errors.Wrap(err, "An IO error occurred during the current operation")
|
||||
return "", errors.Wrap(err, "An IO error occurred while writing the new snapshot file")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue