1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-18 11:52:11 +01:00

New: Warning on generic Ajax error (404 etc)

- Previously DataTables would only show an error message if there was a
  JSON parsing error. However, if there was any other kind of error,
  such as a 404, it would just silently swallow the error. THink its
  best to show an error and a tech note.
This commit is contained in:
Allan Jardine 2013-11-18 11:46:04 +00:00
parent 6dcc69ee54
commit 0f18491cf1
2 changed files with 7 additions and 2 deletions

View File

@ -1 +1 @@
ae0951bf93e1b87ced3c70ddf3a18ed3ae55277d
4adf77363c60f233d2674e2eb2706032270c1839

View File

@ -2224,8 +2224,13 @@
"cache": false,
"type": oSettings.sServerMethod,
"error": function (xhr, error, thrown) {
var log = oSettings.oApi._fnLog;
if ( error == "parsererror" ) {
oSettings.oApi._fnLog( oSettings, 0, 'Invalid JSON response', 1 );
log( oSettings, 0, 'Invalid JSON response', 1 );
}
else {
log( oSettings, 0, 'Ajax error', 7 );
}
}
};