diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2021-04-12 12:23:11 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2021-04-12 12:23:11 -0400 |
commit | 986cd2a6a4b3e9f6ac54f96237bc1c9d1cea497b (patch) | |
tree | 26c0bbe76278880d6aaf7dc9b1f404d837a30ea1 /vendor/github.com/Microsoft/hcsshim/errors.go | |
parent | 3803a2630f2bc53f18cbf2b7a825ff1b068a0fb7 (diff) | |
download | podman-986cd2a6a4b3e9f6ac54f96237bc1c9d1cea497b.tar.gz podman-986cd2a6a4b3e9f6ac54f96237bc1c9d1cea497b.tar.bz2 podman-986cd2a6a4b3e9f6ac54f96237bc1c9d1cea497b.zip |
vendor in containers/storage v1.29.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
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 } |