DataObjects/pman.links.ini
[Pman.Core] / Pman.Request.js
index 6aa40aa..1fb5107 100644 (file)
@@ -86,7 +86,7 @@ Roo.extend(Pman.Request, Roo.data.Connection, {
                 }
             }
             Roo.MessageBox.hide(); // hide any existing messages..
-            Roo.MessageBox.alert("Error", res.errorMsg ? res.errorMsg : "Error Sending");
+            Roo.MessageBox.alert("Error", res && res.errorMsg ?  res.errorMsg : "Error Sending data");
             return;
         }
         Roo.callback(options.success, options.scope, [res, options]);
@@ -103,9 +103,9 @@ Roo.extend(Pman.Request, Roo.data.Connection, {
         }
         if (res !== true) {
             var decode = this.processResponse(response);
-                
+            Roo.log(decode);   
             Roo.MessageBox.hide(); // hide any existing messages..
-            Roo.MessageBox.alert("Error", "Error Sending" + decode.errorMsg);
+            Roo.MessageBox.alert("Error", decode && decode.errorMsg ?  decode.errorMsg : "Error Sending data");
         }
     }
 });
\ No newline at end of file