popup error message or write console log when fetch data failed
popup error message or write console log when fetch data failed
![ChuckLu](https://datatables.net/forums/uploads/userpics/931/n9I9M39Q0PQDM.png)
Link to test case: https://github.com/ChuckTest/DataTablesTest/tree/75cbfa040c4ba07175e5d831f34c251e00f82215
Debugger code (debug.datatables.net):
Error messages shown: no error message show, but there is error on console of browser
Description of problem:
can't access property "length", aData is undefined
Get the above error message when did a test, I figure out later that I did not set the data source in correct format. It would be better to check the aData is get successfully or not before the for loop, and throw exception message "load data failed".
https://github.com/DataTables/DataTablesSrc/commit/3818add76a9bf921d51be2488f47e190677f4883#r134402388
Answers
I have created a new branch based above git commit of the test repository https://github.com/ChuckTest/DataTablesTest/tree/issue-2023-1207-001