mirror of
https://github.com/gnh1201/caterpillar.git
synced 2024-11-26 15:31:45 +00:00
Update console.html
This commit is contained in:
parent
3bbad3d53e
commit
5004e64363
10
console.html
10
console.html
|
@ -51,7 +51,7 @@
|
|||
success: function(response) {
|
||||
var responseData = {
|
||||
"error": {
|
||||
"message": "Empty response data"
|
||||
"message": "Unknown error"
|
||||
}
|
||||
};
|
||||
var process_corrupted_json = function(s) {
|
||||
|
@ -63,12 +63,16 @@
|
|||
responseData = JSON.parse(s.substring(start, end));
|
||||
}
|
||||
} catch (e) {
|
||||
responseData.error.message = e.message;
|
||||
responseData.error.message = e.message
|
||||
+ "\r\nRaw response data:"
|
||||
+ "\r\n" + response;
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
if (response.trim() != "") {
|
||||
if (response.trim() == "") {
|
||||
responseData.error.message = "Received an empty response data";
|
||||
} else {
|
||||
responseData = JSON.parse(response);
|
||||
}
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user