小编Kun*_*nak的帖子

要么重新中断此方法,要么重新抛出声纳中的“InterruptedException 问题”

在我的方法之一中,中断异常和执行异常即将到来。我像这样输入了 try catch 。

try{

  //my code
}catch(InterruptedException|ExecutionException e)

  Log.error(" logging it");
  throw new MonitoringException("it failed" , e)


//monitoringexception extends RunTimeException
Run Code Online (Sandbox Code Playgroud)

同样在我的方法中,我抛出了 InterruptedException,ExecutionException

我在声纳中遇到严重错误 - 重新中断此方法或重新抛出“ InterruptedException

有人知道怎么修这个东西吗。

请立即帮助。

java exception try-catch interrupted-exception throws

18
推荐指数
1
解决办法
2万
查看次数