branch: externals/xelb
commit c042d3fbe9921f9289fe6831bbb1853eac864b4a
Author: Chris Feng <chris.w.f...@gmail.com>
Commit: Chris Feng <chris.w.f...@gmail.com>

    Provide more verbose message when connection failed or auth required
---
 xcb.el |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/xcb.el b/xcb.el
index 0f5ae1a..55e4ba2 100644
--- a/xcb.el
+++ b/xcb.el
@@ -206,7 +206,8 @@ Concurrency is prevented as it breaks the orders of errors 
and replies."
                  (setq obj (make-instance 'xcb:SetupFailed))
                  (xcb:unmarshal obj cache)
                  (setq cache [])
-                 (error "[XELB] %s" obj))
+                 (error "[XELB] Connection failed: %s"
+                        (slot-value obj 'reason)))
                 (1                      ;success
                  (setq obj (make-instance 'xcb:Setup))
                  (setq cache (substring cache (xcb:unmarshal obj cache)))
@@ -215,7 +216,8 @@ Concurrency is prevented as it breaks the orders of errors 
and replies."
                 (2                      ;authentication
                  (setq obj (make-instance 'xcb:SetupAuthenticate))
                  (setq cache (substring cache (xcb:unmarshal obj cache)))
-                 (error "[XELB] %s" obj))
+                 (error "[XELB] Authentication not supported: %s"
+                        (slot-value obj 'reason)))
                 (x (error "Unrecognized setup status: %d" x))))))
         (setf (slot-value connection 'lock) nil)
         (throw 'return 'setup))

Reply via email to