慕侠3348009
2018-08-12 16:17
com.imooc.test.DrunkException: 喝车别开酒
at com.imooc.test.ChainTest.test1(ChainTest.java:16)
at com.imooc.test.ChainTest.test2(ChainTest.java:21)
at com.imooc.test.ChainTest.main(ChainTest.java:9)
java.lang.RuntimeException: com.imooc.test.DrunkException: 喝车别开酒
at com.imooc.test.ChainTest.test2(ChainTest.java:25)
at com.imooc.test.ChainTest.main(ChainTest.java:9)
Caused by: com.imooc.test.DrunkException: 喝车别开酒
at com.imooc.test.ChainTest.test1(ChainTest.java:16)
at com.imooc.test.ChainTest.test2(ChainTest.java:21)
... 1 more
这是你自定义的异常啊,还是链式异常。根源就是Caused by:后面的引起了异常。
代码放出来看看
Java入门第三季
409792 学习 · 4340 问题
相似问题