File gnome-shell-1036494-Catch-import-errors.patch of Package gnome-shell.openSUSE_Leap_42.3_Update

Index: gnome-shell-3.20.4/js/ui/extensionSystem.js
===================================================================
--- gnome-shell-3.20.4.orig/js/ui/extensionSystem.js
+++ gnome-shell-3.20.4/js/ui/extensionSystem.js
@@ -224,7 +224,12 @@ function initExtension(uuid) {
     let extensionState = null;
 
     ExtensionUtils.installImporter(extension);
-    extensionModule = extension.imports.extension;
+    try {
+        extensionModule = extension.imports.extension;
+    } catch(e) {
+        logExtensionError(uuid, e);
+        return false;
+    }
 
     if (extensionModule.init) {
         try {
openSUSE Build Service is sponsored by