kotlin online compiler
snippet in kotlin

Kotlin try

user3443

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

kotlin online compiler

user7266

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