[gjs] when dbus_connection_send_with_reply() fails, print connection and pending call status



commit 8ca60f31bde594f6b137794544860269394033ba
Author: Havoc Pennington <hp pobox com>
Date:   Thu Sep 3 10:52:20 2009 -0400

    when dbus_connection_send_with_reply() fails, print connection and pending call status
    
    Otherwise the exception is a little bit opaque. Well, it is
    a little bit opaque anyway, but maybe this helps somewhat.

 modules/dbus.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/modules/dbus.c b/modules/dbus.c
index a63e20a..64e112d 100644
--- a/modules/dbus.c
+++ b/modules/dbus.c
@@ -367,8 +367,10 @@ gjs_js_dbus_call_async(JSContext  *context,
     pending = NULL;
     if (!dbus_connection_send_with_reply(bus_connection, message, &pending, timeout) ||
         pending == NULL) {
-        gjs_debug(GJS_DEBUG_DBUS, "Failed to send async dbus message");
-        gjs_throw(context, "Failed to send dbus message");
+        gjs_debug(GJS_DEBUG_DBUS, "Failed to send async dbus message connected %d pending %p",
+                  dbus_connection_get_is_connected(bus_connection), pending);
+        gjs_throw(context, "Failed to send dbus message, connected %d pending %p",
+                  dbus_connection_get_is_connected(bus_connection), pending);
         dbus_message_unref(message);
         return JS_FALSE;
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]