项目中使用 sip-servlets-impl-2.0.0.FINAL.jar 出现卡死问题,检查了一下是由于抛出了一个异常没有捕获,问题是这个异常是 Runtime 的:
使用的 jar 里面关键方法大致如下:
org.mobicents.servlet.sip.message.SipServletRequestImpl#createResponse(int, java.lang.String, boolean){
try {
...
if(xx) throw new IllegalStateException("blala");
...
}catch (ParseException ex) {
throw new IllegalArgumentException("Bad status code " + statusCode,
ex);
}
}
然而现在,我能怎么办,必须对这两个运行时异常进行 try catch 了吗?