catch item registry failures
authorCornelius Weiß <c.weiss@metaways.de>
Mon, 17 Jul 2017 14:03:40 +0000 (16:03 +0200)
committerCornelius Weiss <c.weiss@metaways.de>
Mon, 17 Jul 2017 14:01:11 +0000 (16:01 +0200)
Change-Id: I9f5b698ae4e8726cc8ca9651cc9cfd4e5edb3390
Reviewed-on: http://gerrit.tine20.com/customers/5212
Reviewed-by: Cornelius Weiss <c.weiss@metaways.de>
Tested-by: Cornelius Weiss <c.weiss@metaways.de>
tine20/Tinebase/js/ux/ItemRegistry.js

index dd32017..7674f2a 100644 (file)
@@ -138,7 +138,13 @@ Ext.ux.ItemRegistry.prototype = {
             item;
             
         if (typeof def === 'function') {
-            item = new def(this.config);
+            try {
+                item = new def(this.config);
+            } catch (error) {
+                console.error('Ext.ux.ItemRegistry::getItem failed to create')
+                console.error(error);
+                return;
+            }
         } else {
             if (Ext.isString(def)) {
                 def = {xtype: def};