SafeInterpretation

org.specs2.control.eff.SafeInterpretation
See theSafeInterpretation companion trait

Attributes

Companion
trait
Graph
Supertypes
trait SafeCreation
trait SafeTypes
class Object
trait Matchable
class Any
Show all
Self type

Members list

Type members

Inherited types

type _Safe[R] = MemberInOut[Safe, R]

Attributes

Inherited from:
SafeTypes
type _safe[R] = MemberIn[Safe, R]

Attributes

Inherited from:
SafeTypes

Value members

Inherited methods

def attempt[R, A](action: Eff[R, A])(implicit m: MemberInOut[Safe, R]): Eff[R, Either[Throwable, A]]

try to execute an action an report any issue

try to execute an action an report any issue

Attributes

Inherited from:
SafeInterpretation
def attemptSafe[R, A](r: Eff[R, A])(implicit m: MemberInOut[Safe, R]): Eff[R, (Either[Throwable, A], List[Throwable])]

Attempt to execute a safe action including finalizers

Attempt to execute a safe action including finalizers

Attributes

Inherited from:
SafeInterpretation
def bracket[R, A, B, C](acquire: Eff[R, A])(step: A => Eff[R, B])(release: A => Eff[R, C])(implicit m: MemberInOut[Safe, R]): Eff[R, B]

Attributes

Inherited from:
SafeInterpretation
def catchThrowable[R, A, B](action: Eff[R, A], pureValue: A => B, onThrowable: Throwable => Eff[R, B])(implicit m: MemberInOut[Safe, 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

Inherited from:
SafeInterpretation
def eval[R : _safe, A](a: Name[A]): Eff[R, A]

Attributes

Inherited from:
SafeCreation
def exception[R : _safe, A](t: Throwable): Eff[R, A]

Attributes

Inherited from:
SafeCreation
def execSafe[R, U, A](r: Eff[R, A])(implicit m: Aux[Safe, R, U]): Eff[U, Either[Throwable, A]]

run a safe effect but drop the finalizer errors

run a safe effect but drop the finalizer errors

Attributes

Inherited from:
SafeInterpretation
def finalizerException[R : _safe](t: Throwable): Eff[R, Unit]

Attributes

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

ignore one possible exception that could be thrown

ignore one possible exception that could be thrown

Attributes

Inherited from:
SafeInterpretation
def otherwise[R, A](action: Eff[R, A], onThrowable: Eff[R, A])(implicit m: MemberInOut[Safe, 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

Inherited from:
SafeInterpretation
def protect[R : _safe, A](a: => A): Eff[R, A]

Attributes

Inherited from:
SafeCreation
def runSafe[R, U, A](r: Eff[R, A])(implicit m: Aux[Safe, R, U]): Eff[U, (Either[Throwable, A], List[Throwable])]

Run a safe effect

Run a safe effect

Collect finalizer exceptions if any

Attributes

Inherited from:
SafeInterpretation
def safeLoop[R, U, A]: Loop[Safe, R, A, Eff[U, (Either[Throwable, A], Vector[Throwable])], Eff[U, Unit]]

Attributes

Inherited from:
SafeInterpretation
def thenFinally[R, A](action: Eff[R, A], last: Eff[R, Unit])(implicit m: _Safe[R]): Eff[R, A]

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

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

Attributes

Inherited from:
SafeInterpretation
def whenFailed[R, A](action: Eff[R, A], onThrowable: Throwable => Eff[R, A])(implicit m: MemberInOut[Safe, R]): Eff[R, A]

evaluate 1 action possibly throwing exceptions

evaluate 1 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

Attributes

Inherited from:
SafeInterpretation