Module: nagvis
Branch: master
Commit: dd85cc10cff52e8a9c0189d4cd6098fbe6442857
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=dd85cc10cff52e8a9c0189d4cd6098fbe6442857

Author: Lars Michelsen <[email protected]>
Date:   Sun Aug 15 18:23:42 2010 +0200

Added more details to async ajax request processing

---

 share/frontend/nagvis-js/js/ajax.js |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/share/frontend/nagvis-js/js/ajax.js 
b/share/frontend/nagvis-js/js/ajax.js
index 2347d89..9bb0801 100644
--- a/share/frontend/nagvis-js/js/ajax.js
+++ b/share/frontend/nagvis-js/js/ajax.js
@@ -122,7 +122,7 @@ function phpError(text) {
 }
 
 function jsonError(text) {
-       frontendMessage({'type': 'CRITICAL', 'title': 'Syntax error', 
'message': "Invalid JSON response:\n" + text});
+       frontendMessage({'type': 'CRITICAL', 'title': 'Syntax error', 
'message': text});
 }
 
 /**
@@ -178,7 +178,7 @@ function getAsyncRequest(sUrl, bCacheable, callback, 
callbackParams) {
                                                        if(bCacheable)
                                                                
updateQueryCache(sUrl, iNow, responseText);
                                                } catch(e) {
-                                                       jsonError('URL: ' + 
sUrl + ' Response: ' + responseText);
+                                                       jsonError("Exception: " 
+ e.description + "\nTime: " + iNow + "\nURL: " + sUrl + "\nResponse: " + 
responseText);
                                                }
                                                
                                        }
@@ -291,7 +291,7 @@ function getSyncRequest(sUrl, bCacheable, bRetryable) {
                                        try {
                                                sResponse = eval('( 
'+responseText+')');
                                        } catch(e) {
-                                               jsonError('URL: ' + sUrl + ' 
Response: ' + responseText);
+                                               jsonError("Invalid json 
response:\nTime:" + timestamp + "\nURL: " + sUrl + "\nResponse: " + 
responseText);
 
                                                // Clear the response
                                                sResponse = '';


------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to