kotlin playground
snippet in kotlin

Kotlin try

user4536

try {
    // some code
}
catch (e: SomeException) {
    // handler
}
finally {
    // optional finally block
}

kotlin playground

user159

I recommend: https://play.kotlinlang.org/

kotlin online compiler

user6448

This is a good Kotlin online compiler:
https://play.kotlinlang.org/