##// END OF EJS Templates
ajax: improved error messages for failed ajax calls.
marcink -
r1971:9bb20131 default
parent child Browse files
Show More
@@ -81,7 +81,8 b' var CodeMirrorLoadUserHints = function(q'
81 triggerHints(userHintsCache[query]);
81 triggerHints(userHintsCache[query]);
82 })
82 })
83 .fail(function(data, textStatus, xhr) {
83 .fail(function(data, textStatus, xhr) {
84 alert("error processing request: " + textStatus);
84 alert("error processing request. \n" +
85 "Error code {0} ({1}).".format(data.status, data.statusText));
85 });
86 });
86 };
87 };
87
88
@@ -46,7 +46,8 b' var ajaxGET = function(url, success, fai'
46 if (failure) {
46 if (failure) {
47 failure(data, textStatus, xhr);
47 failure(data, textStatus, xhr);
48 } else {
48 } else {
49 alert("error processing request: " + textStatus);
49 alert("Error processing request. \n" +
50 "Error code {0} ({1}).".format(data.status, data.statusText));
50 }
51 }
51 });
52 });
52 return request;
53 return request;
@@ -63,7 +64,8 b' var ajaxPOST = function(url, postData, s'
63 if (failure) {
64 if (failure) {
64 failure(data, textStatus, xhr);
65 failure(data, textStatus, xhr);
65 } else {
66 } else {
66 alert("error processing request: " + textStatus);
67 alert("Error processing request. \n" +
68 "Error code {0} ({1}).".format(data.status, data.statusText));
67 }
69 }
68 });
70 });
69 return request;
71 return request;
General Comments 0
You need to be logged in to leave comments. Login now