attempt

open suspend fun <E, A> attempt(f: suspend EagerEffectScope<E>.() -> A): suspend EagerEffectScope<E>.() -> A

Encloses an action for which you want to catch any shift. attempt is used in combination with catch.

attempt { ... } catch { ... }

The f may shift into a different EagerEffectScope, giving the chance for a later catch to change the shifted value. This is useful to simulate re-throwing of exceptions.