tryCatchBool

inline fun tryCatchBool(block: () -> Boolean): Boolean

tryCatchBool used when you want to return a boolean value or return false if an exception is thrown.

Example:

tryCatchBoolean {
...
throw Exception("throw")
} // false

tryCatchBoolean {
val result = false
if(...) {
result = true
}
result
}

Since

1.2.0

See also