attempt

fun <T> attempt(call: () -> T): <Error class: unknown class><T>?

Run call and return its result, or null without running it once tripped. An Exception is returned as a failure and counts towards the limit; a success resets the count. An Error propagates.