Olek Brzozowski
03/15/2022, 12:45 PMthrow throw RuntimeException("i am double throw")
kqr
03/15/2022, 12:52 PMNothing
Youssef Shoaib [MOD]
03/15/2022, 12:54 PMNothing
, which can be used everywhere and anywhere. This example obviously is silly, but a more realistic one is:
throw if(conditionToThrowCustomException) prepareAndThrowCustomException() else RuntimeException("something else failed")
Youssef Shoaib [MOD]
03/15/2022, 12:55 PMNothing
"quirk", but it is still pretty useful and it isn't unintuitive per seIgnat Beresnev
03/15/2022, 1:12 PMreturn
has been discussed here 🙂
https://kotlinlang.slack.com/archives/C09222272/p1645799061136249Olek Brzozowski
03/15/2022, 1:20 PMchristophsturm
03/15/2022, 4:33 PM