要屏蔽dwr的error需要在dwr.xml配置中加如下代码:
<convert match="java.lang.Exception" converter="exception">
<param name='include' value='message'/>
</convert>
dwrTest.doTest({callback:backMethod,errorHandler:function(message,exception)(alert(exception.message);)});
就可以将自己的异常信息 显示出来!
<convert match="java.lang.Exception" converter="exception">
<param name='include' value='message'/>
</convert>
dwrTest.doTest({callback:backMethod,errorHandler:function(message,exception)(alert(exception.message);)});
就可以将自己的异常信息 显示出来!