diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-08-29 22:15:05 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-08-29 22:15:05 +0900 |
| commit | 08eeafe8174efed2414d66788a927168efeba691 (patch) | |
| tree | 966ab2b3abec177ee3eaeac777b4b636a32261df /container/errors.go | |
| parent | d7c7c69a13868546c26c3e5096fca09304a6e182 (diff) | |
container/mount: unwrap vfs decoder errors
These are now handled by init. This eliminates generic WrapErr from mount and procPaths.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/errors.go')
| -rw-r--r-- | container/errors.go | 11 |
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 } |
