tryCatchBool
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
}
Content copied to clipboard
Since
1.2.0