Updated on 2026-08-14

This commit is contained in:
Tangem 2025-04-14 17:17:49 +04:00
parent b139e9ff97
commit 32887fb26d
4 changed files with 43 additions and 28 deletions

View file

@ -146,4 +146,10 @@ sealed class Lce<out E : Any, out C : Any> {
ifContent = { predicate(it) },
ifError = { false },
)
fun onError(action: (error: E) -> Unit): Lce<E, C> {
if (this is Error) action(this.error)
return this
}
}