在我的一个方法中,出现了中断异常和执行异常。我像这样放在try catch块中。
try{
//my code
}catch(InterruptedException|ExecutionException e)
Log.error(" logging it");
throw new MonitoringException("it failed" , e)
//monitoringexception extends RunTimeException
我的方法中也放置了 throws InterruptedException,ExecutionException
我在 Sonar 中遇到以下严重错误 - 要么重新中断该方法,要么重新抛出 "InterruptedException
"
有人知道如何解决吗?
请立即提供帮助。