mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-11-22 16:23:50 +00:00
Update RepeatOnFailure.kt
This commit is contained in:
parent
527a2a91ac
commit
3a5771a0cc
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user