safe

fun <T> safe(apiCall: () -> T): T?(source)

Catches any exception (or error) and only logs it. Will return null on exceptions.