Add prefixes to external errors
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
142e22a4dc
commit
bbf760ee6f
1 changed files with 2 additions and 3 deletions
|
@ -2,7 +2,6 @@ package runtime
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
@ -329,7 +328,7 @@ func waitForStart(p *process, cmd *exec.Cmd) error {
|
||||||
}
|
}
|
||||||
for _, m := range messages {
|
for _, m := range messages {
|
||||||
if m.Level == "error" {
|
if m.Level == "error" {
|
||||||
return errors.New(m.Msg)
|
return fmt.Errorf("shim error: %v", m.Msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// no errors reported back from shim, check for runc/runtime errors
|
// no errors reported back from shim, check for runc/runtime errors
|
||||||
|
@ -342,7 +341,7 @@ func waitForStart(p *process, cmd *exec.Cmd) error {
|
||||||
}
|
}
|
||||||
for _, m := range messages {
|
for _, m := range messages {
|
||||||
if m.Level == "error" {
|
if m.Level == "error" {
|
||||||
return errors.New(m.Msg)
|
return fmt.Errorf("oci runtime error: %v", m.Msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ErrContainerNotStarted
|
return ErrContainerNotStarted
|
||||||
|
|
Loading…
Reference in a new issue