我想调用
虚构的语法:
Thread.sleep
方法,并且如果确实抛出了 InterruptException
异常,则将其传播。虚构的语法:
Interruptibles.sleep(1000);
这相当于
try {
Thread.sleep(1000);
} catch (InterruptException e) {
throw Throwables.propagate(e);
}
常用库(如guava、apache commons等)中是否有类似的功能?