Kotlin rzuć wyjątek
throw Exception("Exception message")
Promofo
throw Exception("Exception message")
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
}