ErrorInterpretation

org.atnos.eff.ErrorInterpretation
trait ErrorInterpretation[F] extends ErrorCreation[F]

Attributes

Source
ErrorInterpretation.scala
Graph
Supertypes
trait ErrorCreation[F]
trait ErrorTypes[F]
class Object
trait Matchable
class Any
Known subtypes
trait ErrorEffect[F]
object ErrorEffect
Self type

Members list

Type members

Inherited types

type Error = Either[Throwable, F]

type of errors: exceptions or failure messages

type of errors: exceptions or failure messages

Attributes

Inherited from:
ErrorTypes
Source
ErrorTypes.scala
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

Attributes

Inherited from:
ErrorTypes
Source
ErrorTypes.scala
type _ErrorOrOk[R] = Member[ErrorOrOk, R]

Attributes

Inherited from:
ErrorTypes
Source
ErrorTypes.scala
type _errorOrOk[R] = MemberIn[ErrorOrOk, R]

Attributes

Inherited from:
ErrorTypes
Source
ErrorTypes.scala

Value members

Concrete methods

def andFinally[R, A](action: Eff[R, A], lastAction: 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

Attributes

Source
ErrorInterpretation.scala
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

Attributes

Source
ErrorInterpretation.scala
def errorInterpreter[R, A, B](pureValue: A => B, onError: Error => Eff[R, B]): Interpreter[ErrorOrOk, R, A, B]

Attributes

Source
ErrorInterpretation.scala
def ignoreException[R, E <: Throwable : ClassTag, A](action: Eff[R, A])(implicit evidence$1: 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

Attributes

Source
ErrorInterpretation.scala
def localError[SR, BR, U1, U2, F1, F2, A](r: Eff[SR, A], getter: F1 => F2)(implicit sr: Aux[[_] =>> Evaluate[F1, _$14], SR, U1], br: Aux[[_] =>> Evaluate[F2, _$15], BR, U2], into: IntoPoly[U1, U2]): Eff[BR, A]

Lift a computation over a "small" error (for a subsystem) into a computation over a "bigger" error (for the full application)

Lift a computation over a "small" error (for a subsystem) into a computation over a "bigger" error (for the full application)

Attributes

Source
ErrorInterpretation.scala
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

Attributes

Source
ErrorInterpretation.scala
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.

Attributes

Source
ErrorInterpretation.scala
def runLocalError[R, U, F1, F2, A](r: Eff[R, A], getter: F1 => F2)(implicit sr: Aux[[_] =>> Evaluate[F1, _$21], R, U], br: MemberIn[[_] =>> Evaluate[F2, _$22], 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)

Attributes

Source
ErrorInterpretation.scala
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

Attributes

Source
ErrorInterpretation.scala

Inherited methods

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

create an Eff value from an error

create an Eff value from an error

Attributes

Inherited from:
ErrorCreation
Source
ErrorCreation.scala
def eval[R : _errorOrOk, A](a: Eval[A]): Eff[R, A]

create an Eff value from a computation

create an Eff value from a computation

Attributes

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

create an Eff value from an exception

create an Eff value from an exception

Attributes

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

create an Eff value from a failure

create an Eff value from a failure

Attributes

Inherited from:
ErrorCreation
Source
ErrorCreation.scala
def ok[R : _errorOrOk, A](a: => A): Eff[R, A]

create an Eff value from a computation

create an Eff value from a computation

Attributes

Inherited from:
ErrorCreation
Source
ErrorCreation.scala