filereader的物件 filenotfoundexception
錯誤傳遞給構造方法乙個null,構造方法將丟擲乙個nullpointexception空指標異
構造方法初始化了乙個檔案輸出流,如果這個檔案不開啟,這個構造方法將丟擲乙個ioexception
arraylist類的get方法,如果 i 引數值小於0或者大於size,將丟擲乙個indexoutofbound***ception異常。
sqlexception
5 常見異常
算術異常類:arithmeticexecption
空指標異常類:nullpointerexception
型別強制轉換異常:classcastexception
陣列負下標異常:negativearrayexception
陣列下標越界異常:arrayindexoutofbound***ception
違背安全原則異常:secturityexception
檔案已結束異常:eofexception
檔案未找到異常:filenotfoundexception
字串轉換為數字異常:numberformatexception
運算元據庫異常:sqlexception
輸入輸出異常:ioexception
方法未找到異常:nosuchmethodexception
classcastexception(型別轉換異常), illegalargumentexception(非法計算異常), indexoutofbound***ception(下標越界異常),nosuchelementexception(沒有這樣的元素異常), nullpointerexception(空指標異常), rasterformatexception, securityexception, systemexception(系統出現的異常)
runtimeexception
arithmeticexception, arraystoreexception, bufferoverflowexception, bufferunderflowexception, cannotredoexception, cannotundoexception, classcastexception, cmmexception, concurrentmodificationexception, domexception, emptystackexception, illegalargumentexception, illegalmonitorstateexception, illegalpathstateexception, illegalstateexception, imagingopexception, indexoutofbound***ception, missingresourceexception, negativearraysizeexception, nosuchelementexception, nullpointerexception, profiledataexception, providerexception, rasterformatexception, securityexception, systemexception, undeclaredthrowableexception, unmodifiablesetexception, unsupportedoperationexception
Python中的異常型別
1 nameerror 嘗試訪問乙個未申明的變數 v nameerror name v is not defined 2 zerodivisionerror 除數為0 v 1 0 zerodivisionerror int division or modulo by zero 3 syntaxerr...
Python中的異常型別
1 nameerror 嘗試訪問乙個未申明的變數 v nameerror name v is not defined 2 zerodivisionerror 除數為0 v 1 0 zerodivisionerror int division or modulo by zero 3 syntaxerr...
Promise中then和catch的執行過程
一直以來有個誤解,以為then和catch的執行就是乙個二選一的過程,直到後來遇到類似下面的 發現不是這麼一回事 promise.reject then catch promise.resolve then catch 執行結果自然是2 1 1 2 翻了一下then和catc 檔,catch是the...