diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-08-30 22:49:12 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-08-30 22:49:12 +0900 |
| commit | f5abce9df5727904a1daa246025a87c4bfe62553 (patch) | |
| tree | 7e8c29b83e97532954dee8adb5f86962eaebca34 /system/acl.go | |
| parent | ddb003e39b64c2417cabc291383d99b4ad64ac8f (diff) | |
system: wrap op errors
This passes more information allowing for better error handling. This eliminates generic WrapErr from system.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'system/acl.go')
| -rw-r--r-- | system/acl.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/system/acl.go b/system/acl.go index 5d48c6c1..82777b95 100644 --- a/system/acl.go +++ b/system/acl.go @@ -36,8 +36,7 @@ func (a *ACL) Type() Enablement { return a.et } func (a *ACL) apply(sys *I) error { msg.Verbose("applying ACL", a) - return wrapErrSuffix(acl.Update(a.path, sys.uid, a.perms...), - fmt.Sprintf("cannot apply ACL entry to %q:", a.path)) + return newOpError("acl", acl.Update(a.path, sys.uid, a.perms...), false) } func (a *ACL) revert(sys *I, ec *Criteria) error { @@ -49,8 +48,7 @@ func (a *ACL) revert(sys *I, ec *Criteria) error { msg.Verbosef("target of ACL %s no longer exists", a) err = nil } - return wrapErrSuffix(err, - fmt.Sprintf("cannot strip ACL entry from %q:", a.path)) + return newOpError("acl", err, true) } else { msg.Verbose("skipping ACL", a) return nil |
