fun methodWithException() {
try {
throw Exception("test exception")
}
catch (e: Exception) {
//Любая частичная обработка
//и передача ошибки вызывающему коду
throw e
}
}
try {
methodWithException()
}
catch (e: Exception) {
println(e.message);
}