Skip to content

Commit

Permalink
Add extra debug info
Browse files Browse the repository at this point in the history
This PR adds extra debug info, allowing to know which DBus
method call produced an error, and to which DBus client.
  • Loading branch information
sergio-costas authored and 3v1n0 committed Aug 5, 2024
1 parent 7a63c1e commit 19ee5b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion appIndicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 2 additions & 0 deletions dbusMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 19ee5b0

Please sign in to comment.