【发布时间】:2011-10-18 09:07:33
【问题描述】:
我有以下代码:
public static void main(String[] args)
{
willItThrowException();
}
private static void willItThrowException() throws RuntimeException
{
throw new RuntimeException();
}
是否有任何 Eclipse 配置可以在方法声明中声明但未在 willItThrowException(); 行中捕获的未捕获运行时异常显示警告/错误?
【问题讨论】:
-
是的,如果 eclipse 显示警告,那么它的检查异常而不是 JB 所说的运行时。
标签: java eclipse exception-handling checked-exceptions