glauglau Posts: 2Questions: 0Answers: 0
edited March 2010 in Bug reports
It might be a good idea to change all alerts to throws as I just ran into an instance where infinite alerts from datatable crashed by machine.

This is the alert that I'm getting:
DataTables warning: Unable to re-initialise DataTable. Please use the API to make any configuration changes required.

What would cause this? I am trying to make multiple calls to datatable on different tables individually (passing different settings); is this possible?


  • glauglau Posts: 2Questions: 0Answers: 0
    NVM the alerts were being caused by a bug in my code. But I would still say throws are better than alerts in widgets as they don't prevent interaction, they break program flow at the point of error, they provide stack tracing to locate the problem, and errors like this are better for developers to see instead of end users.
  • allanallan Posts: 61,985Questions: 1Answers: 10,162 Site admin
    Agreed! You'd be surprised by the number of comments in this forum where there are Javascript errors which aren't spotted - I suspect a throw would be likewise missed. So I used alert() to 'drive the message home' :-).

    I do hope to do a debug version of DataTables at some point which will be able to give trace debug information and more control over this kind of error message. Certainly I'm going to unify how the messages are presented in the next version.

This discussion has been closed.