org.specs2.control.eff

ErrorEffect

trait ErrorEffect[F] extends AnyRef

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

This effect is a mix of Eval and Disjunction 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.

Self Type
ErrorEffect[F]
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ErrorEffect
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type Error = \/[Throwable, F]

    type of errors: exceptions or failure messages

  2. implicit class ErrorEffectOps[R <: Effects, A] extends AnyRef

    OPERATIONS

  3. type ErrorOrOk[A] = \/[Error, Name[A]]

    base type for this effect: either an error or a computation to evaluate scala.

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

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

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

    evaluate 1 actions possibly having error effects

    evaluate 1 actions possibly having error effects

    Execute a second action whether the first is successful or not

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

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

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

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

    create an Eff value from an error

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

    create an Eff value from an exception

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

    create an Eff value from a failure

  14. def finalize(): Unit

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

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

    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

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

    create an Eff value from a computation

  22. def orElse[R <: Effects, A](action: Eff[R, A], onError: Eff[R, A])(implicit m: <=[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

  23. def runError[R <: Effects, A](r: Eff[|:[ErrorOrOk, R], A]): Eff[R, \/[Error, A]]

    Run an error effect.

    Run an error effect.

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

  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  25. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. def whenFailed[R <: Effects, A](action: Eff[R, A], onError: (Error) ⇒ Eff[R, A])(implicit m: <=[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

Inherited from AnyRef

Inherited from Any

Ungrouped