fix date calc
[gitlive] / XObject.js
index 3cf6662..8f1e30d 100644 (file)
@@ -197,8 +197,21 @@ XObject.prototype = {
            
         }
         if (!this.el && typeof(this.xtype) == 'object') {
+            
             XObject.log("obj?"  + XObject.keys(this.config).join(','));
-            this.el = new (this.xtype)(this.config);
+            try {
+                this.el = new (this.xtype)(this.config);
+            } catch(e) {
+                print(JSON.stringify(e,null,4));
+                print(JSON.stringify(this.config,null,4));
+                print(e.stack);
+                
+                 throw {
+                    name: "ArgumentError", 
+                    message :"Error creating object from xtype(object)"
+                 };
+            }
+              
       
         }
         //print(this.el);
@@ -383,9 +396,9 @@ XObject.prototype = {
         
                if (!this.el) {
                        print('missing el?');
-                       print(this.cfg);
-                       print(this.init);
-               }
+                       print(fn);
+                       print(JSON.stringify(this.cfg));
+                       }
                
                
         if (typeof(Seed) != 'undefined') {
@@ -755,6 +768,7 @@ XObject.extend(XObject,
             }
             
             XObject.log("TRYING BASE OBJECT : " + gname);
+                         
             // in the situation where we have been called and there is a base object
             // defining the behavior..
             // then we should copy the prototypes from the base object into this..