[GRID] How to catch "Incorrect XML" error?


Probably a simple question - If during loading grid fed by xml I redirect browser to diffrent page, I got an error information pop up - “Error type: Load XML; Description: Incorrect XML”. That is fine, but i would like to ignore this message and not display it. I tried catching all errors from initialization code, but it did not help :confused:


grid_<%=random_id%> = new dhtmlXGridObject(‘gridbox_<%=random_id%>’);



<% if options[:open_node] %>


        grid_<%=random_id%>.showRow(<%= options[:open_node] %>)

        grid_<%=random_id%>.cells(<%= options[:open_node] %>,0).open();



<% else %>


<% end %>

}catch(err){ }

You can use next code snippet

function myErrorHandler(type, desc, erData){
    //custom code can be placed here
    return false;
dhtmlxError.catchError(“LoadXML”, myErrorHandler);

I cannot find this “catchError” function anywere, in the Docs or in the .js files.

The function itself defined in dhtmlxcommon.js
It has not any special description in documentation, the only possible use-case - described above.