fix error messages on invalid response to stores
[roojs1] / roojs-ui-debug.js
index 9d46cd0..eba698e 100644 (file)
@@ -712,7 +712,8 @@ Roo.extend(Roo.data.Store, Roo.util.Observable, {
     // private
     // Called as a callback by the Reader during a load operation.
     loadRecords : function(o, options, success){
-        if(!o || success === false){
+         
+        if(!o){
             if(success !== false){
                 this.fireEvent("load", this, [], options, o);
             }
@@ -1564,7 +1565,13 @@ Roo.extend(Roo.data.HttpProxy, Roo.data.DataProxy, {
             result = o.reader.read(response);
         }catch(e){
             this.fireEvent("loadexception", this, o, response, e);
-            o.request.callback.call(o.request.scope, null, o.request.arg, false);
+            o.request.callback.call(o.request.scope, {
+                    success : false,
+                    raw : {
+                        errorMsg : response
+                    }
+                    
+                }, o.request.arg, false);
             return;
         }