mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2025-09-01 06:09:32 +00:00
Update RepeatOnFailure.kt
This commit is contained in:
@@ -7,8 +7,8 @@ package dev.inmo.micro_utils.common
|
||||
*/
|
||||
inline fun <R> repeatOnFailure(
|
||||
times: Int,
|
||||
crossinline onEachFailure: (Throwable) -> Unit = {},
|
||||
crossinline action: (Int) -> R
|
||||
onEachFailure: (Throwable) -> Unit = {},
|
||||
action: (Int) -> R
|
||||
): Optional<R> {
|
||||
repeat(times) {
|
||||
runCatching {
|
||||
|
Reference in New Issue
Block a user