tryCatchNull

inline fun <T> tryCatchNull(block: () -> T): T?

tryCatchNull used when you want to return null if an exception is thrown.

Example:

tryCatchNull {
throw Exception("throw")
num++
} // null

tryCatchNull {
var num = 0
++num
} // 1

Since

1.1.0