aboutsummaryrefslogtreecommitdiffhomepage
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/output.go8
-rw-r--r--system/output_test.go4
2 files changed, 7 insertions, 5 deletions
diff --git a/system/output.go b/system/output.go
index ec1802b6..f3a4bc5c 100644
--- a/system/output.go
+++ b/system/output.go
@@ -33,14 +33,16 @@ func (e *OpError) Error() string {
}
switch {
- case errors.As(e.Err, new(*os.PathError)), errors.As(e.Err, new(*net.OpError)):
+ case errors.As(e.Err, new(*os.PathError)),
+ errors.As(e.Err, new(*net.OpError)),
+ errors.As(e.Err, new(*container.StartError)):
return e.Err.Error()
default:
if !e.Revert {
- return "cannot apply " + e.Op + ": " + e.Err.Error()
+ return "apply " + e.Op + ": " + e.Err.Error()
} else {
- return "cannot revert " + e.Op + ": " + e.Err.Error()
+ return "revert " + e.Op + ": " + e.Err.Error()
}
}
}
diff --git a/system/output_test.go b/system/output_test.go
index 5ad219b7..ba760e84 100644
--- a/system/output_test.go
+++ b/system/output_test.go
@@ -26,11 +26,11 @@ func TestOpError(t *testing.T) {
ErrDBusConfig, syscall.ENOTRECOVERABLE},
{"apply", newOpError("tmpfile", syscall.EBADE, false),
- "cannot apply tmpfile: invalid exchange",
+ "apply tmpfile: invalid exchange",
syscall.EBADE, syscall.EBADF},
{"revert", newOpError("wayland", syscall.EBADF, true),
- "cannot revert wayland: bad file descriptor",
+ "revert wayland: bad file descriptor",
syscall.EBADF, syscall.EBADE},
{"path", newOpError("tmpfile", &os.PathError{Op: "stat", Path: "/run/dbus", Err: syscall.EISDIR}, false),