diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-04-12 11:57:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-12 11:57:44 -0700 |
commit | a6fb11e34ccc13e9cfd6ec37030c0634d1bee830 (patch) | |
tree | bb39ecb86553bc1e0ee8a83b20e6cb48da93dab3 /vendor/github.com/Microsoft/hcsshim/errors.go | |
parent | d40c3076ac664b2510f4097d1ece7bca50ca3f83 (diff) | |
parent | 986cd2a6a4b3e9f6ac54f96237bc1c9d1cea497b (diff) | |
download | podman-a6fb11e34ccc13e9cfd6ec37030c0634d1bee830.tar.gz podman-a6fb11e34ccc13e9cfd6ec37030c0634d1bee830.tar.bz2 podman-a6fb11e34ccc13e9cfd6ec37030c0634d1bee830.zip |
Merge pull request #9998 from rhatdan/VENDOR
vendor in containers/storage v1.29.0
Diffstat (limited to 'vendor/github.com/Microsoft/hcsshim/errors.go')
-rw-r--r-- | vendor/github.com/Microsoft/hcsshim/errors.go | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/vendor/github.com/Microsoft/hcsshim/errors.go b/vendor/github.com/Microsoft/hcsshim/errors.go index 061727c67..794308673 100644 --- a/vendor/github.com/Microsoft/hcsshim/errors.go +++ b/vendor/github.com/Microsoft/hcsshim/errors.go @@ -83,7 +83,6 @@ type NetworkNotFoundError = hns.NetworkNotFoundError type ProcessError struct { Process *process Operation string - ExtraInfo string Err error Events []hcs.ErrorEvent } @@ -92,7 +91,6 @@ type ProcessError struct { type ContainerError struct { Container *container Operation string - ExtraInfo string Err error Events []hcs.ErrorEvent } @@ -125,22 +123,9 @@ func (e *ContainerError) Error() string { s += "\n" + ev.String() } - if e.ExtraInfo != "" { - s += " extra info: " + e.ExtraInfo - } - return s } -func makeContainerError(container *container, operation string, extraInfo string, err error) error { - // Don't double wrap errors - if _, ok := err.(*ContainerError); ok { - return err - } - containerError := &ContainerError{Container: container, Operation: operation, ExtraInfo: extraInfo, Err: err} - return containerError -} - func (e *ProcessError) Error() string { if e == nil { return "<nil>" @@ -171,15 +156,6 @@ func (e *ProcessError) Error() string { return s } -func makeProcessError(process *process, operation string, extraInfo string, err error) error { - // Don't double wrap errors - if _, ok := err.(*ProcessError); ok { - return err - } - processError := &ProcessError{Process: process, Operation: operation, ExtraInfo: extraInfo, Err: err} - return processError -} - // IsNotExist checks if an error is caused by the Container or Process not existing. // Note: Currently, ErrElementNotFound can mean that a Process has either // already exited, or does not exist. Both IsAlreadyStopped and IsNotExist @@ -256,7 +232,7 @@ func getInnerError(err error) error { func convertSystemError(err error, c *container) error { if serr, ok := err.(*hcs.SystemError); ok { - return &ContainerError{Container: c, Operation: serr.Op, ExtraInfo: serr.Extra, Err: serr.Err, Events: serr.Events} + return &ContainerError{Container: c, Operation: serr.Op, Err: serr.Err, Events: serr.Events} } return err } |