type
TryT[F[_], A] = invariant.OpacityTypes.TryT[F, A]
Abstract Value Members
-
abstract
def
getClass(): Class[_]
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
equals(arg0: Any): Boolean
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
def
toString(): String
A monad transformer for exception handling.
As a monad transformer,
TryT
should be used with another monadic data type, like scalaz.Name.Given a
validate
function,when creating a
TryT
-transformed scalaz.Name from thevalidate
,then the exceptions thrown in
validate
call should be converted to a scala.util.Failure;and when there is no exception thrown in
validate
call,then the result of
validate
call should be converted to a scala.util.Success;and when the
TryT
-transformed scalaz.Name is built from afor
-comprehension,then the exceptions thrown in the
for
-comprehension should be converted to a scala.util.Failure;val TryT(Name(failure2)) = invalidTry failure2 should be(an[Failure[_]])
This
TryT
type is an opacity alias toF[Try[A]]
. All type classes and helper functions for thisTryT
type are defined in the companion object TryTThis
TryT
transfomer is similar to scalaz.EitherT, exceptTryT
handles exceptions thrown in callback functions passed to map, bind or point.