有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java如何使父方法抛出异常?

如何让匿名runnable使父方法抛出异常

public boolean drive2Exit() throws Exception {
    while(true) {
        handler.postDelayed(new Runnable() {
            public void run() {
                try {
                    ...
                catch (Exception e) {
                    //drive2Exit should throw exception
                }
            }
        }, 100);
    }
}

共 (1) 个答案