问题:
bytes = infOutSystemService.applyExecute(str.getBytes()); // bubbo方法调用异常
增加 try catch 后依然没有打印错误
try {
bytes = infOutSystemService.applyExecute(str.getBytes());
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
原因:dubbo 接口只处理了Excption, 没有处理Error, 所以没有返回报文, 直接把Error抛出来了。
解决方案:
如需要捕获error的话,采用throwable
try {
bytes = infOutSystemService.applyExecute(str.getBytes());
} catch (Throwable e) {
// TODO: handle exception
e.printStackTrace();
}