tryCatchElse
tryCatchElse used when you want to return a default value if an exception is thrown.
Example:
var num = 0
tryCatchElse(elseBlock = { --num }) {
throw Exception("throw")
num++
} // -1
tryCatchElse(elseBlock = { --num }) {
++num
} // 0
Content copied to clipboard
Since
1.1.0