diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-11-15 21:26:31 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-11-15 21:26:31 +0900 |
| commit | 12751932d1cbfc911a75445061d87264b927de5f (patch) | |
| tree | 91124c8cd504004593b6f0710c1529843a0b4a50 /internal/system/output.go | |
| parent | 41b49137a8d11183c0d13ea32527f58f9c1a3dec (diff) | |
internal/wayland: improve error handling
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>
Diffstat (limited to 'internal/system/output.go')
| -rw-r--r-- | internal/system/output.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/system/output.go b/internal/system/output.go index 71acace4..a1666dc3 100644 --- a/internal/system/output.go +++ b/internal/system/output.go @@ -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() |
