Error

The Error effect is both an Eval effect and a Either one with Throwable Either F on the “left” side. The idea is to represent computations which can fail, either with an exception or a failure. You can:

Other useful combinators are available:

When you run an Error effect you get back an Error Either A where Error is a type alias for Throwable Either Failure.

The Error object implements this effect with String as the Failure type but you are encouraged to create our own failure datatype and extend the Error[MyFailureDatatype] trait.