Catch

catcheffect.Catch$
See theCatch companion trait
object Catch

Attributes

Companion
trait
Source
Catch.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Catch.type

Members list

Type members

Classlikes

final class PartiallyAppliedUse[F[_], E](instance: Catch[F])

Attributes

Source
Catch.scala
Supertypes
class Object
trait Matchable
class Any
final case class RaisedInUncancellable[E](e: E, alloc: SourcePos, caller: SourcePos) extends RuntimeException

Attributes

Source
Catch.scala
Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
final case class RaisedWithoutHandler[E](e: E, alloc: SourcePos, caller: SourcePos) extends RuntimeException

Attributes

Source
Catch.scala
Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def apply[F[_]](implicit F: Catch[F]): Catch[F]

Attributes

Source
Catch.scala
def eitherT[F[_]](implicit F: Concurrent[F]): Catch[[_] =>> EitherT[F, Vault, _$23]]

Attributes

Source
Catch.scala
def fromHandle[F[_]](implicit F: Concurrent[F], H: Handle[F, Vault]): Catch[F]

Attributes

Source
Catch.scala
def fromLocal[F[_]](implicit F: Concurrent[F], L: Local[F, Vault]): Catch[F]

Implements Catch via the cancellation of an effect F.

Implements Catch via the cancellation of an effect F.

Note that when an instance of Catch has been constructed like this, invoking any method on Handle inside an uncancelable block is considered an error.

Using cancellation to raise errors has some advantages and disadvantages.

Catch, unlike cats.data.EitherT, does not have potentially dangerous semantics regarding resource safety (EitherT's left case when releasing resources). For reference the default implementation of cats.effect.MonadCancel's guarenteeCase will not invoke the finalizer when you use cats.data.EitherT and the effect is in the Left case.

Attributes

Source
Catch.scala
def ioCatch: IO[Catch[IO]]

Attributes

Source
Catch.scala
def kleisli[F[_] : Concurrent]: Catch[[_] =>> Kleisli[F, Vault, _$14]]

Attributes

Source
Catch.scala