ErrorOps

izumi.functional.bio.syntax.Syntax2$.ErrorOps
class ErrorOps[F[_, _], +E, +A](val r: F[E, A])(implicit val F: Error2[F]) extends ApplicativeErrorOps[F, E, A]

Attributes

Graph
Supertypes
class ApplicativeErrorOps[F, E, A]
class GuaranteeOps[F, E, A]
class ApplicativeOps[F, E, A]
class FunctorOps[F, E, A]
class Object
trait Matchable
class Any
Known subtypes
class BracketOps[F, E, A]
class PanicOps[F, E, A]
class IOOps[F, E, A]
class AsyncOps[F, E, A]

Members list

Concise view

Value members

Concrete methods

final def attempt: F[Nothing, Either[E, A]]
final def catchAll[E2, A2 >: A](h: E => F[E2, A2]): F[E2, A2]
final def catchSome[E1 >: E, A2 >: A](h: PartialFunction[E, F[E1, A2]]): F[E1, A2]
final def flatMap[E1 >: E, B](f0: A => F[E1, B]): F[E1, B]
final def flatten[E1 >: E, A1](implicit ev: A <:< F[E1, A1]): F[E1, A1]
final def flip: F[A, E]
final def fromEither[E1 >: E, A1](implicit ev: A <:< Either[E1, A1]): F[E1, A1]
final def fromOption[E1 >: E, A1](errorOnNone: => E1)(implicit ev1: A <:< Option[A1]): F[E1, A1]
final def fromOptionF[E1 >: E, B](fallbackOnNone: => F[E1, B])(implicit ev: A <:< Option[B]): F[E1, B]
final def iterateUntil(p: A => Boolean): F[E, A]
final def iterateWhile(p: A => Boolean): F[E, A]
final def leftFlatMap[E2](f: E => F[Nothing, E2]): F[E2, A]
final def redeem[E2, B](err: E => F[E2, B], succ: A => F[E2, B]): F[E2, B]
final def redeemPure[B](err: E => B, succ: A => B): F[Nothing, B]
final def retryUntil(f: E => Boolean): F[E, A]
final def retryUntilF(f: E => F[Nothing, Boolean]): F[E, A]
final def retryWhile(f: E => Boolean): F[E, A]
final def retryWhileF(f: E => F[Nothing, Boolean]): F[E, A]
final def tap[E1 >: E](f0: A => F[E1, Unit]): F[E1, A]
final def tapBoth[E1 >: E, E2 >: E1](err: E => F[E1, Unit])(succ: A => F[E2, Unit]): F[E2, A]
final def tapError[E1 >: E](f: E => F[E1, Unit]): F[E1, A]
final def withFilter[A1 >: A, E1 >: E](predicate: A => Boolean)(implicit filter: WithFilter[E1], pos: SourceFilePositionMaterializer): F[E1, A]

for-comprehensions sugar:

for-comprehensions sugar:

 for {
   (1, 2) <- F.pure((2, 1))
 } yield ()

Use widenError for pattern matching with non-Throwable errors:

 val f = for {
   (1, 2) <- F.pure((2, 1)).widenError[Option[Unit]]
 } yield ()
 // f: F[Option[Unit], Unit] = F.fail(Some(())

Attributes

Inherited methods

final def *>[E1 >: E, B](f0: => F[E1, B]): F[E1, B]

execute two operations in order, return result of second operation

execute two operations in order, return result of second operation

Attributes

Inherited from:
ApplicativeOps
final def <*[E1 >: E, B](f0: => F[E1, B]): F[E1, A]

execute two operations in order, same as *>, but return result of first operation

execute two operations in order, same as *>, but return result of first operation

Attributes

Inherited from:
ApplicativeOps
final def as[B](b: => B): F[E, B]

Attributes

Inherited from:
FunctorOps
final def bimap[E2, B](f: E => E2, g: A => B): F[E2, B]

Attributes

Inherited from:
ApplicativeErrorOps
final def forever: F[E, Nothing]

Attributes

Inherited from:
ApplicativeOps
final def fromOptionOr[B](valueOnNone: => B)(implicit ev: A <:< Option[B]): F[E, B]

Attributes

Inherited from:
FunctorOps
final def guarantee(cleanup: F[Nothing, Unit]): F[E, A]

Attributes

Inherited from:
GuaranteeOps
final def leftMap[E2](f: E => E2): F[E2, A]

Attributes

Inherited from:
ApplicativeErrorOps
final def leftMap2[E2, A1 >: A, E3](r2: => F[E2, A1])(f: (E, E2) => E3): F[E3, A1]

Attributes

Inherited from:
ApplicativeErrorOps
final def map[B](f: A => B): F[E, B]

Attributes

Inherited from:
FunctorOps
final def map2[E2 >: E, B, C](r2: => F[E2, B])(f: (A, B) => C): F[E2, C]

execute two operations in order, map their results

execute two operations in order, map their results

Attributes

Inherited from:
ApplicativeOps
final def orElse[E2, A1 >: A](r2: => F[E2, A1]): F[E2, A1]

Attributes

Inherited from:
ApplicativeErrorOps
final def void: F[E, Unit]

Attributes

Inherited from:
FunctorOps
final def widen[A1](implicit ev: A <:< A1): F[E, A1]

Attributes

Inherited from:
FunctorOps
final def widenBoth[E1 >: E, A1](implicit ev2: A <:< A1): F[E1, A1]

Attributes

Inherited from:
ApplicativeErrorOps
final def widenError[E1 >: E]: F[E1, A]

Attributes

Inherited from:
ApplicativeErrorOps
final def zip[E2 >: E, B, C](r2: => F[E2, B]): F[E2, (A, B)]

execute two operations in order, return result of both operations

execute two operations in order, return result of both operations

Attributes

Inherited from:
ApplicativeOps