kotlin catching exceptions and printing exception message code example Example: kotlin throw exception throw Exception("Exception message")