DhtmlxError handler

Hi,
We are using dhtmlxError.catchError(type,myErrorHandler);
Here the type can have :
LoadXML,ALL,DataStructure…

1.How many types are available and what are they?

2.if any improper xml returned froms server myErrorHandler will be called.it is ok. but can i use this same error handler for improper result with attachURL() method?

Thanks,
Naresh Adla

Hi,

How many types are available and what are they?

There are 3 errors (you already mentioned them)

  • LoadXML - an error occurred while xml loading
  • DataStructure - incorrect data structure (can be thrown only in Tree)
  • ALL - can be used instead of settings 2 handlers mentioned above

but can i use this same error handler for improper result with attachURL() method?

Nope. In this case you need to process error manually. You can use for example dhtmlxAjax instead of attachURL(url,true) method:
dhtmlxAjax/samples/01_samples_of_usage/01_send_request.html

and instead loaded text using attachHTMLString(str) method.

dhtmlxAjax.get(url,function(loader){ if(loader.xmlDoc.responseText!=null) layout.cells("a').attachHTMLString(loader.xmlDoc.responseText); else alert("Error status = "+loader.xmlDoc.status); });