Trait/Object

org.atnos.eff

ErrorEffect

Related Docs: object ErrorEffect | package eff

Permalink

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 Xor 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.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ErrorEffect
  2. ErrorInterpretation
  3. ErrorCreation
  4. ErrorTypes
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Error = Xor[Throwable, F]

    Permalink

    type of errors: exceptions or failure messages

    type of errors: exceptions or failure messages

    Definition Classes
    ErrorTypes
  2. type ErrorOrOk[A] = Xor[Error, Eval[A]]

    Permalink

    base type for this effect: either an error or a computation to evaluate scala.Name represents "by-name" value: values not yet evaluated

    base type for this effect: either an error or a computation to evaluate scala.Name represents "by-name" value: values not yet evaluated

    Definition Classes
    ErrorTypes

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def andFinally[R <: Effects, A](action: Eff[R, A], last: Eff[R, Unit])(implicit m: <=[ErrorOrOk, R]): Eff[R, A]

    Permalink

    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

    Definition Classes
    ErrorInterpretation
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def catchError[R <: Effects, A, B](action: Eff[R, A], pure: (A) ⇒ B, onError: (Error) ⇒ Eff[R, B])(implicit m: <=[ErrorOrOk, R]): Eff[R, B]

    Permalink

    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

    Definition Classes
    ErrorInterpretation
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def error[R, A](error: Error)(implicit m: <=[ErrorOrOk, R]): Eff[R, A]

    Permalink

    create an Eff value from an error

    create an Eff value from an error

    Definition Classes
    ErrorCreation
  11. def eval[R, A](a: EvalEffect.Eval[A])(implicit m: <=[ErrorOrOk, R]): Eff[R, A]

    Permalink

    create an Eff value from a computation

    create an Eff value from a computation

    Definition Classes
    ErrorCreation
  12. def exception[R, A](t: Throwable)(implicit m: <=[ErrorOrOk, R]): Eff[R, A]

    Permalink

    create an Eff value from an exception

    create an Eff value from an exception

    Definition Classes
    ErrorCreation
  13. def fail[R, A](failure: F)(implicit m: <=[ErrorOrOk, R]): Eff[R, A]

    Permalink

    create an Eff value from a failure

    create an Eff value from a failure

    Definition Classes
    ErrorCreation
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. def ignoreException[R <: Effects, E <: Throwable, A](action: Eff[R, A])(implicit arg0: ClassTag[E], m: <=[ErrorOrOk, R]): Eff[R, Unit]

    Permalink

    ignore one possible exception that could be thrown

    ignore one possible exception that could be thrown

    Definition Classes
    ErrorInterpretation
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def localError[SR, BR, U, E1, E2, A](r: Eff[SR, A], getter: (E1) ⇒ E2)(implicit sr: Aux[[X]Xor[Xor[Throwable, E1], Eval[X]], SR, U], br: Aux[[X]Xor[Xor[Throwable, E2], Eval[X]], BR, U]): Eff[BR, A]

    Permalink

    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)

    Definition Classes
    ErrorInterpretation
  20. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. def ok[R, A](a: ⇒ A)(implicit m: <=[ErrorOrOk, R]): Eff[R, A]

    Permalink

    create an Eff value from a computation

    create an Eff value from a computation

    Definition Classes
    ErrorCreation
  24. def orElse[R <: Effects, A](action: Eff[R, A], onError: Eff[R, A])(implicit m: <=[ErrorOrOk, R]): Eff[R, A]

    Permalink

    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

    Definition Classes
    ErrorInterpretation
  25. def runError[R <: Effects, U <: Effects, A](r: Eff[R, A])(implicit m: Aux[ErrorOrOk, R, U]): Eff[U, Xor[Error, A]]

    Permalink

    Run an error effect.

    Run an error effect.

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

    Definition Classes
    ErrorInterpretation
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  28. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. def whenFailed[R <: Effects, A](action: Eff[R, A], onError: (Error) ⇒ Eff[R, A])(implicit m: <=[ErrorOrOk, R]): Eff[R, A]

    Permalink

    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

    Definition Classes
    ErrorInterpretation

Inherited from ErrorInterpretation[F]

Inherited from ErrorCreation[F]

Inherited from ErrorTypes[F]

Inherited from AnyRef

Inherited from Any

Ungrouped