runIgnoringExceptions

inline fun <R> runIgnoringExceptions(show: Boolean = false, action: () -> R): R?

Similar to runCatching but will return null if an exception is thrown. There is an optional show parameter to also print a stacktrace in the case there is an exception, while still returning null.