hi there - I often use `if(condition) throw Exception(msg)`(jvm). Are in stdlib functions similar to this
Copy code
fun Boolean.throwIfTrue(exception: Exception) { if (this) throw exception }
fun Boolean.throwIfFalse(exception: Exception) { if (!this) throw exception }
Don't think that I`m first how think about it 😃 and better use out-of-the-box approach