jvmMain.com.github.kittinunf.result.runCatching.kt Maven / Gradle / Ivy
package com.github.kittinunf.result
actual inline fun doTry(work: () -> R, errorHandler: (Throwable) -> R): R {
return try {
work()
} catch (t: Throwable) {
errorHandler(t)
}
}