Updated on 2026-08-14
This commit is contained in:
parent
b139e9ff97
commit
32887fb26d
4 changed files with 43 additions and 28 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue