aboutsummaryrefslogtreecommitdiffhomepage
path: root/system/output.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-30 23:44:48 +0900
committerOphestra <cat@gensokyo.uk>2025-08-30 23:44:48 +0900
commit712cfc06d7e541c6e28b4b127a4760b4cfccffa8 (patch)
tree3dbd2bc0fc03ba5d108646b342392f5fdf841c90 /system/output.go
parentf5abce9df5727904a1daa246025a87c4bfe62553 (diff)
container: wrap container init start errors
This helps indicate the exact origin and nature of the error. This eliminates generic WrapErr from container. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'system/output.go')
-rw-r--r--system/output.go8
1 files changed, 5 insertions, 3 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()
}
}
}