Module: nagvis Branch: master Commit: a819d8dc5010b6c684e920b3e33b7439bdc5f714 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=a819d8dc5010b6c684e920b3e33b7439bdc5f714
Author: Lars Michelsen <[email protected]> Date: Sun Aug 15 11:53:41 2010 +0200 Added request url to json error messages --- share/frontend/nagvis-js/js/ajax.js | 13 +++---------- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/share/frontend/nagvis-js/js/ajax.js b/share/frontend/nagvis-js/js/ajax.js index c360d9f..2347d89 100644 --- a/share/frontend/nagvis-js/js/ajax.js +++ b/share/frontend/nagvis-js/js/ajax.js @@ -178,7 +178,7 @@ function getAsyncRequest(sUrl, bCacheable, callback, callbackParams) { if(bCacheable) updateQueryCache(sUrl, iNow, responseText); } catch(e) { - jsonError(responseText); + jsonError('URL: ' + sUrl + ' Response: ' + responseText); } } @@ -291,15 +291,8 @@ function getSyncRequest(sUrl, bCacheable, bRetryable) { try { sResponse = eval('( '+responseText+')'); } catch(e) { - var oMsg = {}; - oMsg.type = 'CRITICAL'; - oMsg.message = "Invalid JSON response:\n"+responseText; - oMsg.title = "Syntax error"; - - // Handle application message/error - frontendMessage(oMsg); - oMsg = null; - + jsonError('URL: ' + sUrl + ' Response: ' + 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
