Package-level declarations
Types
Receiver type belonging to mapOrAccumulate. Allows binding both Either and EitherNel values for Either.Left types of Error. It extends Raise of Error, and allows working over Raise of NonEmptyList of Error as well.
RaiseCancellationException is a delicate api, and should be used with care. It drives the short-circuiting behavior of Raise.
Tracing result. Allows to inspect the traces from where raise was called.
Functions
Allows safely catching exceptions of type T
without capturing CancellationException, or fatal exceptions like OutOfMemoryError
or VirtualMachineError
on the JVM.
Allows safely catching exceptions without capturing CancellationException, or fatal exceptions like OutOfMemoryError
or VirtualMachineError
on the JVM.
Runs the Effect and captures any nonFatalOrThrow exception into Result.
A version of catch that refines the Throwable to T. This is useful for wrapping foreign code, such as database, network calls, etc.
The most general way to execute a computation using Raise. Depending on the outcome of the block, one of the two lambdas is run:
The most general way to execute a computation using Raise. Depending on the outcome of the block, one of the three lambdas is run:
invoke
the EagerEffect and fold the result:
Transform the raised value Error of the EagerEffect
into OtherError. This results in an EagerEffect
that returns a value of A or raises OtherError.
Transform the raised value Error of the Effect
into OtherError, or raise an exception into suspend. This results in an Effect
that returns a value of A or raises OtherError.
Accumulate the errors obtained by executing the transform over every element of NonEmptyList.
Accumulate the errors obtained by executing the transform over every element of NonEmptySet.
Transform every element of iterable using the given transform, or accumulate all the occurred errors using combine.
Execute the Raise context function resulting in A or any logical error of type Error, and recover by providing a transform Error into a fallback value of type A. Base implementation of effect { f() } getOrElse { fallback() }
.
Catch the raised value Error of the Effect
. You can either return a value a new value of A, or short-circuit the effect by raising with a value of OtherError, or raise an exception into suspend.
Run the EagerEffect by returning Either.Right of A, or Either.Left of Error.
Run the Effect by returning Either.Right of A, or Either.Left of Error.
Run the EagerEffect by returning Option of A, recover run the fallback lambda and returning its result of Option of A.
Run the EagerEffect by returning Result of A, or Result.Failure if raised with Throwable.
Run the Effect by returning Result of A, or Result.Failure if raised with Throwable.
Run the EagerEffect by returning Result of A, recover run the fallback lambda and returning its result of Result of A.
Execute the Raise context function resulting in A or any logical error of type OtherError, and transform any raised OtherError into Error, which is raised to the outer Raise.
Accumulate the errors from running action1, action2, action3, action4, and action5 using the given combine.
Accumulate the errors from running action1, action2, action3, action4, action5, and action6 using the given combine.
Accumulate the errors from running action1, action2, action3, action4, action5, action6, and action7.
Accumulate the errors from running action1, action2, action3, action4, action5, action6, and action7 using the given combine.
Accumulate the errors from running action1, action2, action3, action4, action5, action6, action7, and action8.
Accumulate the errors from running action1, action2, action3, action4, action5, action6, action7, and action8 using the given combine.
Accumulate the errors from running action1, action2, action3, action4, action5, action6, action7, action8, and action9.