Zpracování výjimek kotlin

Příklady kódu

3
0

zkuste chytit kotlin

try{
  // wirte here somethin that you thought it would throw expection
}
catch(e:Expection){ 
  e.printstacktrace() 
  // handle expection or write upper line of code
}
finally{
	// this block is optional 
  	// this will always run if expection come or not
}
1
0

kotlin házet výjimky

throw Exception("Exception message")

V jiných jazycích

Tato stránka je v jiných jazycích

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................