determining source of error with dhtmlxError

I have a page that uses 2 grids and 2 trees in the same page.

How can I determine what the source object is of an error using dhtmlxError.catchError ?

You can get reference to the origin object in the next way

function myErrorHandler(type, desc, erData){ var obj = erData[1]; //origin object if (obj == mygrid) do_something(); } dhtmlxError.catchError("ALL",myErrorHandler);