Object/Trait

org.specs2.control.eff

SafeEffect

Related Docs: trait SafeEffect | package eff

Permalink

object SafeEffect extends SafeEffect

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SafeEffect
  2. SafeEffect
  3. SafeInterpretation
  4. SafeCreation
  5. SafeTypes
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Out[A] = (Either[Throwable, A], List[Throwable])

    Permalink
    Definition Classes
    SafeInterpretation
  2. type _Safe[R] = Member[Safe, R]

    Permalink
    Definition Classes
    SafeTypes
  3. type _safe[R] = MemberIn[Safe, R]

    Permalink
    Definition Classes
    SafeTypes

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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def attempt[R, A](action: Eff[R, A])(implicit m: /=[Safe, R]): Eff[R, Either[Throwable, A]]

    Permalink

    try to execute an action an report any issue

    try to execute an action an report any issue

    Definition Classes
    SafeInterpretation
  6. def attemptSafe[R, A](effect: Eff[R, A])(implicit m: /=[Safe, R]): Eff[R, (Either[Throwable, A], List[Throwable])]

    Permalink

    Attempt to execute a safe action including finalizers

    Attempt to execute a safe action including finalizers

    Definition Classes
    SafeInterpretation
  7. def bracket[R, A, B, C](acquire: Eff[R, A])(use: (A) ⇒ Eff[R, B])(release: (A) ⇒ Eff[R, C])(implicit m: /=[Safe, R]): Eff[R, B]

    Permalink

    get a resource A and use it.

    get a resource A and use it. Call the release function whether an exception is thrown or not when using the resource

    NOTE: Eff interpreters are independent so if there is an effect short-circuiting all computations inside 'use', like Option or Either then the release function will not be called. If you want to make sure that the release function is always called "at the end of the world and whatever happens" you need to call Eff.bracketLast

    Definition Classes
    SafeInterpretation
  8. def catchThrowable[R, A, B](action: Eff[R, A], pureValue: (A) ⇒ B, onThrowable: (Throwable) ⇒ Eff[R, B])(implicit m: /=[Safe, R]): Eff[R, B]

    Permalink

    evaluate first action possibly having error effects

    evaluate first action possibly having error effects

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

    Definition Classes
    SafeInterpretation
  9. def clone(): AnyRef

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def exception[R, A](t: Throwable)(implicit arg0: _safe[R]): Eff[R, A]

    Permalink
    Definition Classes
    SafeCreation
  13. def execSafe[R, U, A](r: Eff[R, A])(implicit m: Aux[Safe, R, U]): Eff[U, Either[Throwable, A]]

    Permalink

    run a safe effect but drop the finalizer errors

    run a safe effect but drop the finalizer errors

    Definition Classes
    SafeInterpretation
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def finalizerException[R](t: Throwable)(implicit arg0: _safe[R]): Eff[R, Unit]

    Permalink
    Definition Classes
    SafeCreation
  16. final def getClass(): Class[_]

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

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

    Permalink

    ignore one possible exception that could be thrown

    ignore one possible exception that could be thrown

    Definition Classes
    SafeInterpretation
  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  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 otherwise[R, A](action: Eff[R, A], onThrowable: Eff[R, A])(implicit m: /=[Safe, R]): Eff[R, A]

    Permalink

    evaluate first action possibly having exceptions

    evaluate first action possibly having exceptions

    Execute a second action if the first one is not successful

    Definition Classes
    SafeInterpretation
  24. def protect[R, A](a: ⇒ A)(implicit arg0: _safe[R]): Eff[R, A]

    Permalink
    Definition Classes
    SafeCreation
  25. def recoverThrowable[R, A, B](action: Eff[R, A], pureValue: (A) ⇒ B, onThrowable: PartialFunction[Throwable, Eff[R, B]])(implicit m: /=[Safe, R]): Eff[R, B]

    Permalink

    evaluate first action possibly having error effects

    evaluate first action possibly having error effects

    Execute a second action if the first one is not successful and second is defined for the error

    Definition Classes
    SafeInterpretation
  26. def runSafe[R, U, A](effect: Eff[R, A])(implicit m: Aux[Safe, R, U]): Eff[U, (Either[Throwable, A], List[Throwable])]

    Permalink

    Run a safe effect

    Run a safe effect

    Collect finalizer exceptions if any

    Definition Classes
    SafeInterpretation
  27. def safeInterpreter[R, A](last: Option[(Eff[R, Unit], /=[Safe, R])]): Interpreter[Safe, R, A, Out[A]]

    Permalink
    Definition Classes
    SafeInterpretation
  28. def safeInterpreter[R, A]: Interpreter[Safe, R, A, Out[A]]

    Permalink
    Definition Classes
    SafeInterpretation
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  30. def thenFinally[R, A](effect: Eff[R, A], last: Eff[R, Unit])(implicit m: /=[Safe, R]): Eff[R, A]

    Permalink

    evaluate first action possibly having error effects execute a second action whether the first is successful or not but keep track of finalizer exceptions

    evaluate first action possibly having error effects execute a second action whether the first is successful or not but keep track of finalizer exceptions

    Definition Classes
    SafeInterpretation
  31. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. def whenFailed[R, A](action: Eff[R, A], onThrowable: (Throwable) ⇒ Eff[R, A])(implicit m: /=[Safe, R]): Eff[R, A]

    Permalink

    evaluate first action possibly throwing exceptions

    evaluate first action possibly throwing exceptions

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

    The final value type is the same as the original type

    Definition Classes
    SafeInterpretation
  36. def whenThrowable[R, A](action: Eff[R, A], onThrowable: PartialFunction[Throwable, Eff[R, A]])(implicit m: /=[Safe, R]): Eff[R, A]

    Permalink

    evaluate first action possibly throwing exceptions

    evaluate first action possibly throwing exceptions

    Execute a second action if the first one is not successful and second is defined for the error

    The final value type is the same as the original type

    Definition Classes
    SafeInterpretation

Inherited from SafeEffect

Inherited from SafeInterpretation

Inherited from SafeCreation

Inherited from SafeTypes

Inherited from AnyRef

Inherited from Any

Ungrouped