Catching JSON warning

Catching JSON warning

jnedzeljnedzel Posts: 28Questions: 4Answers: 0
edited November 2012 in General
I am trying to catch the warning that "JSON data from server could not be parsed." I've tried doing the following:

[code]
$.fn.dataTableExt.sErrMode = 'throw';
try {
oTable.dataTable({
"bDestroy" : true,
"bJQueryUI" : true,
"bProcessing" : true,
"sAjaxSource" : "./rest/"+ urlSuffix,
"sAjaxDataProp" : ajaxDataProperty,
"aoColumns" : this.fieldsToColumnProperties(objectFields, objectHeadings, hiddenFields, entityName, tableSelector),
"sDom": 'T<"clear">lfrtip',
"oTableTools": tableToolsProps
});
} catch (err) {
alert("caught error: " + err);
};
[/code]

But it never gets into the catch block. I'm using DataTables 1.9.4. Any ideas what might be wrong?
This discussion has been closed.