I'm trying to capture and handle the return of a NullPointerException in my DWR method call:
CompaniesByCountyFactory.getElementCompanies(command, countyId, stateId, {
callback:popupDisplay,
errorHandler:function(message){jQuery("<span>errorHandler::"+message+"</span>").dialog();},
exceptionHandler:function(errorString, exception){jQuery("
<span>exceptionHandler::"+errorString+"</span>").dialog();}
});
Now the code path I'm testing causes getElementCompanies to throw a null pointer exception. This method is only called by DWR and is how I'm trying to communicate that the user must be logged out.
The problem stands in that neither my errorHandler or my exceptionHandler are ever being called.
DWR seems to see the exception and then automatically issue an alert() of the exception error string and I cannot figure out how to override this behavior.
Any ideas what I'm doing wrong?
Thanks