But the exception parameter t is declared as a Throwable, and Throwable cannot be thrown from foo unless the throws clause is modified.
但是异常参数t被声明为Throwable,且如果没有修改throws子句,则Throwable不能从foo中抛出。
Also note that the invoke method declares that it throws Throwable, so you either must catch it or let your testing framework handle it, as I've done.
还请注意invoke方法声明它要throws Throwable,必须捕获异常或者让测试框架处理它,就像我做的那样。
应用推荐