ErrorEffect

trait ErrorEffect[F] extends ErrorCreation[F] with ErrorInterpretation[F]

Effect for computation which can fail and return a Throwable, or just stop with a failure

This effect is a mix of Eval and Either in the sense that every computation passed to this effect (with the ok method) is considered "impure" or "faulty" by default.

The type F is used to represent the failure type.

Companion:
object
trait ErrorCreation[F]
trait ErrorTypes[F]
class Object
trait Matchable
class Any
object ErrorEffect.type

Type members

Inherited types

type Error = Either[Throwable, F]

type of errors: exceptions or failure messages

type of errors: exceptions or failure messages

Inherited from:
ErrorTypes
type ErrorOrOk[A] = Evaluate[F, A]

base type for this effect: either an error or a computation to evaluate a "by-name" value

base type for this effect: either an error or a computation to evaluate a "by-name" value

Inherited from:
ErrorTypes
Inherited from:
ErrorTypes
Inherited from:
ErrorTypes

Value members

Inherited methods

def andFinally[R, A](action: Eff[R, A], last: Eff[R, Unit])(implicit m: MemberInOut[ErrorOrOk, R]): Eff[R, A]

evaluate 1 action possibly having error effects

evaluate 1 action possibly having error effects

Execute a second action whether the first is successful or not

Inherited from:
ErrorInterpretation
def catchError[R, A, B](action: Eff[R, A], pure: A => B, onError: Error => Eff[R, B])(implicit m: MemberInOut[ErrorOrOk, R]): Eff[R, B]

evaluate 1 action possibly having error effects

evaluate 1 action possibly having error effects

Execute a second action if the first one is not successful, based on the error

Inherited from:
ErrorInterpretation
def error[R : _errorOrOk, A](error: Error): Eff[R, A]

create an Eff value from an error

create an Eff value from an error

Inherited from:
ErrorCreation
def eval[R : _errorOrOk, A](a: Name[A]): Eff[R, A]

create an Eff value from a computation

create an Eff value from a computation

Inherited from:
ErrorCreation
def exception[R : _errorOrOk, A](t: Throwable): Eff[R, A]

create an Eff value from an exception

create an Eff value from an exception

Inherited from:
ErrorCreation
def fail[R : _errorOrOk, A](failure: F): Eff[R, A]

create an Eff value from a failure

create an Eff value from a failure

Inherited from:
ErrorCreation
def ignoreException[R, E <: Throwable : ClassTag, A](action: Eff[R, A])(implicit evidence$6: ClassTag[E], m: MemberInOut[ErrorOrOk, R]): Eff[R, Unit]

ignore one possible exception that could be thrown

ignore one possible exception that could be thrown

Inherited from:
ErrorInterpretation
def ok[R : _errorOrOk, A](a: => A): Eff[R, A]

create an Eff value from a computation

create an Eff value from a computation

Inherited from:
ErrorCreation
def orElse[R, A](action: Eff[R, A], onError: Eff[R, A])(implicit m: MemberInOut[ErrorOrOk, R]): Eff[R, A]

evaluate 1 action possibly having error effects

evaluate 1 action possibly having error effects

Execute a second action if the first one is not successful

Inherited from:
ErrorInterpretation
def runError[R, U, A](r: Eff[R, A])(implicit m: Aux[ErrorOrOk, R, U]): Eff[U, Either[Error, A]]

Run an error effect.

Run an error effect.

Stop all computation if there is an exception or a failure.

Inherited from:
ErrorInterpretation
def runLocalError[R, U, F1, F2, A](r: Eff[R, A], getter: F1 => F2)(implicit sr: Aux[[_] =>> Evaluate[F1, _$13], R, U], br: MemberIn[[_] =>> Evaluate[F2, _$14], U]): Eff[U, A]

Translate an error effect to another one in the same stack a computation over a "bigger" error (for the full application)

Translate an error effect to another one in the same stack a computation over a "bigger" error (for the full application)

Inherited from:
ErrorInterpretation
def whenFailed[R, A](action: Eff[R, A], onError: Error => Eff[R, A])(implicit m: MemberInOut[ErrorOrOk, R]): Eff[R, A]

evaluate 1 action possibly having error effects

evaluate 1 action possibly having error effects

Execute a second action if the first one is not successful, based on the error

The final value type is the same as the original type

Inherited from:
ErrorInterpretation