From ec052382449f830e56397385d8cd2be6b09ce458 Mon Sep 17 00:00:00 2001 From: Sergio Costas Rodriguez Date: Fri, 1 Mar 2024 14:07:25 +0100 Subject: [PATCH] Add extra debug info This PR adds extra debug info, allowing to know which DBus method call produced an error, and to which DBus client. --- appIndicator.js | 5 ++++- dbusMenu.js | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/appIndicator.js b/appIndicator.js index ff95f79..944afcc 100644 --- a/appIndicator.js +++ b/appIndicator.js @@ -312,7 +312,10 @@ class AppIndicatorProxy extends DBusProxy { } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) { // the property may not even exist, silently ignore it - Util.Logger.debug(`While refreshing property ${propertyName}: ${e}`); + Util.Logger.debug(`Error when calling 'Get(${propertyName})' ` + + `in ${this.gName}, ${this.gObjectPath}, ` + + `org.freedesktop.DBus.Properties, ${this.gInterfaceName} ` + + `while refreshing property ${propertyName}: ${e}`); this.set_cached_property(propertyName, null); this._cancellables.delete(propertyName); delete this._changedProperties[propertyName]; diff --git a/dbusMenu.js b/dbusMenu.js index 6e8067d..95dcea0 100644 --- a/dbusMenu.js +++ b/dbusMenu.js @@ -517,6 +517,8 @@ export const DBusClient = GObject.registerClass({ ret.is_of_type(new GLib.VariantType('()'))) this._requestLayoutUpdate(); } catch (e) { + Util.Logger.debug('Error when calling \'AboutToShow()\' in ' + + `${this.gName}, ${this.gObjectPath}, ${this.gInterfaceName}`); if (e.matches(Gio.DBusError, Gio.DBusError.UNKNOWN_METHOD) || e.matches(Gio.DBusError, Gio.DBusError.FAILED)) { this._hasAboutToShow = false;