summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Heon <mheon@redhat.com>2020-08-24 11:48:53 -0400
committerMatthew Heon <matthew.heon@pm.me>2020-08-27 15:05:12 -0400
commit2ac37f10b4e87dd360b6c6b6a20524a4c414b916 (patch)
tree42fb024ca6c13563806cd82a8603bc967e133e92
parent72c5b35ea5db44ca1c81a688d90f5c3aa8f8262e (diff)
downloadpodman-2ac37f10b4e87dd360b6c6b6a20524a4c414b916.tar.gz
podman-2ac37f10b4e87dd360b6c6b6a20524a4c414b916.tar.bz2
podman-2ac37f10b4e87dd360b6c6b6a20524a4c414b916.zip
Fix up some error messages
We have a lot of 'cannot stat %s' errors in our codebase. These are terrible and confusing and utterly useless without context. Add some context to a few of them so we actually know what part of the code is failing. Signed-off-by: Matthew Heon <mheon@redhat.com>
-rw-r--r--libpod/oci_conmon_linux.go2
-rw-r--r--pkg/specgen/generate/config_linux.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go
index 82d91c3f6..f66835771 100644
--- a/libpod/oci_conmon_linux.go
+++ b/libpod/oci_conmon_linux.go
@@ -120,7 +120,7 @@ func newConmonOCIRuntime(name string, paths []string, conmonPath string, runtime
if os.IsNotExist(err) {
continue
}
- return nil, errors.Wrapf(err, "cannot stat %s", path)
+ return nil, errors.Wrapf(err, "cannot stat OCI runtime %s path %q", name, path)
}
if !stat.Mode().IsRegular() {
continue
diff --git a/pkg/specgen/generate/config_linux.go b/pkg/specgen/generate/config_linux.go
index 35508c023..1d5dcd8e7 100644
--- a/pkg/specgen/generate/config_linux.go
+++ b/pkg/specgen/generate/config_linux.go
@@ -90,7 +90,7 @@ func DevicesFromPath(g *generate.Generator, devicePath string) error {
}
st, err := os.Stat(resolvedDevicePath)
if err != nil {
- return errors.Wrapf(err, "cannot stat %s", devicePath)
+ return errors.Wrapf(err, "cannot stat device path %s", devicePath)
}
if st.IsDir() {
found := false