亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

我第一行為啥是喝車別開酒

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


正在回答

2 回答

這是你自定義的異常啊,還是鏈式異常。根源就是Caused?by:后面的引起了異常。

0 回復 有任何疑惑可以回復我~
#1

慕俠3348009 提問者

鏈式異常,后面的結果跟老師的一樣,就是前面先調用的test1(),代碼是一樣的,我懷疑是版本的原因
2018-08-12 回復 有任何疑惑可以回復我~
#2

qq_Takeiteasy_2 回復 慕俠3348009 提問者

我想知道你主函數是怎么寫的,我覺得不是版本的問題,我猜測你的主函數里也調用了test1()方法。
2018-12-24 回復 有任何疑惑可以回復我~

代碼放出來看看

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

我第一行為啥是喝車別開酒

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號