aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/errors.go
diff options
context:
space:
mode:
Diffstat (limited to 'container/errors.go')
-rw-r--r--container/errors.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/container/errors.go b/container/errors.go
index 8d8ad492..f4198b09 100644
--- a/container/errors.go
+++ b/container/errors.go
@@ -4,17 +4,19 @@ import (
"errors"
"os"
"syscall"
+
+ "hakurei.app/container/vfs"
)
// messageFromError returns a printable error message for a supported concrete type.
func messageFromError(err error) (string, bool) {
- if m, ok := messagePrefixP[MountError, *MountError]("cannot ", err); ok {
+ if m, ok := messagePrefixP[MountError]("cannot ", err); ok {
return m, ok
}
- if m, ok := messagePrefixP[os.PathError, *os.PathError]("cannot ", err); ok {
+ if m, ok := messagePrefixP[os.PathError]("cannot ", err); ok {
return m, ok
}
- if m, ok := messagePrefixP[AbsoluteError, *AbsoluteError]("", err); ok {
+ if m, ok := messagePrefixP[AbsoluteError]("", err); ok {
return m, ok
}
if m, ok := messagePrefix[OpRepeatError]("", err); ok {
@@ -24,6 +26,9 @@ func messageFromError(err error) (string, bool) {
return m, ok
}
+ if m, ok := messagePrefixP[vfs.DecoderError]("cannot ", err); ok {
+ return m, ok
+ }
if m, ok := messagePrefix[TmpfsSizeError]("", err); ok {
return m, ok
}