[polari/wip/bastianilso/error-handling: 3/3] test case to provoke error on #nautilus



commit d6f210992b41cf74780719625ef277d828e65aa9
Author: Bastian Ilsø <bastianilso src gnome org>
Date:   Sun Aug 2 16:31:56 2015 +0200

    test case to provoke error on #nautilus

 src/application.js |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index 71e0e6a..5b407bf 100644
--- a/src/application.js
+++ b/src/application.js
@@ -391,9 +391,23 @@ const Application = new Lang.Class({
             requestData.window = this._window.window;
             roomError.notification = new AppNotifications.ErrorNotification(requestData);
         } finally {
+            log('requestDatas target id is: ' + requestData.targetId);
+            if (requestData.targetId == '#nautilus') {
+                log('setting error to Tp.Error.Channel.Is.Full');
+                requestData.status = 'disconnected';
+                this.emitJS('room-status-changed', requestData);
+                requestData.error = Tp.error_get_dbus_name(Tp.Error.CHANNEL_FULL);
+                let notification = new AppNotifications.ErrorNotification(requestData);
+                roomError.notification = notification;
+            }
+
             this.notificationQueue.setNotification(roomError);
             this.notificationQueue.setNotification(accountError);
         }
+
+        if (requestData.targetId == '#nautilus')
+            return;
+
         requestData.status = 'connected';
         this.emitJS('room-status-changed', requestData);
 



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