internal/wayland: improve error handling
All checks were successful
Test / Create distribution (push) Successful in 36s
Test / Sandbox (push) Successful in 2m21s
Test / Hakurei (push) Successful in 3m20s
Test / Hpkg (push) Successful in 4m9s
Test / Sandbox (race detector) (push) Successful in 4m24s
Test / Hakurei (race detector) (push) Successful in 5m16s
Test / Flake checks (push) Successful in 1m32s
All checks were successful
Test / Create distribution (push) Successful in 36s
Test / Sandbox (push) Successful in 2m21s
Test / Hakurei (push) Successful in 3m20s
Test / Hpkg (push) Successful in 4m9s
Test / Sandbox (race detector) (push) Successful in 4m24s
Test / Hakurei (race detector) (push) Successful in 5m16s
Test / Flake checks (push) Successful in 1m32s
Note: wl_registry_add_listener is undocumented everywhere. Its implementation calls wl_proxy_add_listener which returns 0 on success or -1 on failure. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -40,6 +40,10 @@ func (e *OpError) Error() string {
|
||||
}
|
||||
|
||||
func (e *OpError) Message() string {
|
||||
if m, ok := message.GetMessage(e.Err); ok {
|
||||
return m
|
||||
}
|
||||
|
||||
switch {
|
||||
case e.Msg != "":
|
||||
return e.Error()
|
||||
|
||||
Reference in New Issue
Block a user