mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-25 21:32:51 +09:00
Display more information if an AJAX request fails
This commit is contained in:
parent
ac1e86cf39
commit
b94027bf1c
1 changed files with 7 additions and 2 deletions
|
|
@ -134,8 +134,13 @@
|
|||
// Hide the waiting message and display an error notice.
|
||||
clearTimeout(wfsr_timeout);
|
||||
waiting_obj.hide().trigger("cancel_confirm");
|
||||
var error_info = xhr.status + " " + xhr.statusText + " (" + textStatus + ")";
|
||||
alert("AJAX communication error while requesting " + params.module + "." + params.act + "\n\n" + error_info);
|
||||
if ($(".x_modal-body").size()) {
|
||||
var error_info = xhr.status + " " + xhr.statusText + " (" + textStatus + ")" + "<br><br><pre>" + xhr.responseText + "</pre>";
|
||||
alert("AJAX communication error while requesting " + params.module + "." + params.act + "<br><br>" + error_info);
|
||||
} else {
|
||||
var error_info = xhr.status + " " + xhr.statusText + " (" + textStatus + ")" + "\n\n" + xhr.responseText;
|
||||
alert("AJAX communication error while requesting " + params.module + "." + params.act + "\n\n" + error_info);
|
||||
}
|
||||
};
|
||||
|
||||
// Send the AJAX request.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue