[polari] notify: Handle DBus error



commit 37a71c2103cd67d1c8c5031bf7abcca5d44f164b
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Oct 16 17:39:40 2013 +0200

    notify: Handle DBus error
    
    We can't really do much here, much at least emit a nicer warning ...

 src/notify.js |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/notify.js b/src/notify.js
index d034587..91b7ef9 100644
--- a/src/notify.js
+++ b/src/notify.js
@@ -56,7 +56,10 @@ const Notification = new Lang.Class({
         _proxy.NotifyRemote('polari', this._id, this._icon, this._summary,
                             this._body, this._actions, this._hints, -1,
             Lang.bind(this, function(result, error) {
-                this._id = result[0];
+                if (error)
+                    logError(error, 'Failed to send notification');
+                else
+                    this._id = result[0];
             }));
     },
 


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