Home

Awesome

tryt.scala <a href="http://thoughtworks.com/"><img align="right" src="https://www.thoughtworks.com/imgs/tw-logo.png" title="ThoughtWorks" height="15"/></a>

Build Status Latest version Latest version Scaladoc

tryt.scala contains Scalaz monad transformers for exception handling.

There are two monad transformers: the invariant TryT and the covariant TryT. Unlike scala.EitherT's, those TryT transformers handle both exceptions thrown by native Java or Scala methods and exceptions raised by MonadError.raiseError.

Covariant TryT

Covariant TryT works with monadic data types whose kind is F[+A], like scalaz.concurrent.Future or scalaz.Name.

To use covariant TryT, add the following setting to your build.sbt,

libraryDependencies += "com.thoughtworks.tryt" %% "covariant" % "latest.release"

and check the Scaladoc for usage.

Invariant TryT

Invariant TryT works with all monadic data types

To use invariant TryT, add the following setting to your build.sbt,

libraryDependencies += "com.thoughtworks.tryt" %% "invariant" % "latest.release"

and check the Scaladoc for usage.