From 55362aed3d42e02d3b8aaf2ff79cdcae79ce2b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Sun, 17 Nov 2019 14:35:42 +0100 Subject: [PATCH] messageList: Don't include message actor in error message Because the message actor could also be undefined or a already deallocated ClutterActor, we sometimes fail to show the error message and get an error from Gjs instead. So make sure we always log the proper error message and just leave out the actor. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/833 --- js/ui/messageList.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/ui/messageList.js b/js/ui/messageList.js index 08bcbb444..3188d0377 100644 --- a/js/ui/messageList.js +++ b/js/ui/messageList.js @@ -642,7 +642,7 @@ var MessageListSection = GObject.registerClass({ moveMessage(message, index, animate) { if (!this._messages.includes(message)) - throw new Error(`Impossible to move the untracked message ${message}`); + throw new Error(`Impossible to move untracked message`); let listItem = message.get_parent(); @@ -671,7 +671,7 @@ var MessageListSection = GObject.registerClass({ removeMessage(message, animate) { if (!this._messages.includes(message)) - throw new Error(`Impossible to remove the untracked message ${message}`); + throw new Error(`Impossible to remove untracked message`); let listItem = message.get_parent(); listItem._connectionsIds.forEach(id => message.disconnect(id));