[gnome-shell] status/network: Catch errors when fetching client
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] status/network: Catch errors when fetching client
- Date: Sun, 7 Aug 2022 22:08:37 +0000 (UTC)
commit af132dd8846bfc32d17be7c93118feee7803eca5
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Aug 1 16:55:12 2022 +0200
status/network: Catch errors when fetching client
Otherwise any unrelated errors in that function are hidden,
because exceptions in async functions are turned into promise
rejections (and JS cannot know that we won't handle it at a later
point).
It wouldn't happen to me of course 😉
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2406>
js/ui/status/network.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index 6c374b2068..efe022ae19 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -1749,7 +1749,7 @@ class Indicator extends PanelMenu.SystemIndicator {
this._ctypes[NM.SETTING_VPN_SETTING_NAME] = NMConnectionCategory.VPN;
this._ctypes[NM.SETTING_WIREGUARD_SETTING_NAME] = NMConnectionCategory.VPN;
- this._getClient();
+ this._getClient().catch(logError);
}
async _getClient() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]