The Dangerous Side of Kotlin Result
May 2 · 19 min read · Kotlin Result looks very useful.
We have an operation that can fail:
val user = api.loadUser()
We wrap it with runCatching:
val result = runCatching {
api.loadUser()
}
And that is it. No big try