forked from security/hakurei
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>
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