final case class MapError[T](f: PartialFunction[Throwable, Throwable]) extends SimpleLinearGraphStage[T] with Product with Serializable
Maps error with the provided function if it is defined for an error or, otherwise, passes it on unchanged.
While similar to Recover this stage can be used to transform an error signal to a different one *without* logging
it as an error in the process. So in that sense it is NOT exactly equivalent to recover(t => throw t2)
since recover
would log the t2
error.
- Source
- Ops.scala
Linear Supertypes
Type Hierarchy
Ordering
- Alphabetic
- By Inheritance
Inherited
- MapError
- Serializable
- Serializable
- Product
- Equals
- SimpleLinearGraphStage
- GraphStage
- GraphStageWithMaterializedValue
- Graph
- AnyRef
- Any
Implicitly
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
- new MapError(f: PartialFunction[Throwable, Throwable])
Type Members
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (MapError[T], B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
addAttributes(attr: Attributes): Graph[FlowShape[T, T], NotUsed]
- Definition Classes
- Graph
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
async: Graph[FlowShape[T, T], NotUsed]
Put an asynchronous boundary around this
Graph
Put an asynchronous boundary around this
Graph
- Definition Classes
- Graph
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
createLogic(attr: Attributes): GraphStageLogic with InHandler with OutHandler
- Definition Classes
- MapError → GraphStage
-
final
def
createLogicAndMaterializedValue(inheritedAttributes: Attributes): (GraphStageLogic, NotUsed)
- Definition Classes
- GraphStage → GraphStageWithMaterializedValue
- def ensuring(cond: (MapError[T]) ⇒ Boolean, msg: ⇒ Any): MapError[T]
- def ensuring(cond: (MapError[T]) ⇒ Boolean): MapError[T]
- def ensuring(cond: Boolean, msg: ⇒ Any): MapError[T]
- def ensuring(cond: Boolean): MapError[T]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val f: PartialFunction[Throwable, Throwable]
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
val
in: Inlet[T]
- Definition Classes
- SimpleLinearGraphStage
-
def
initialAttributes: Attributes
- Attributes
- protected
- Definition Classes
- GraphStageWithMaterializedValue
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
lazy val
module: Module
INTERNAL API.
INTERNAL API.
Every materializable element must be backed by a stream layout module
- Definition Classes
- GraphStageWithMaterializedValue → Graph
-
def
named(name: String): Graph[FlowShape[T, T], NotUsed]
- Definition Classes
- Graph
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
val
out: Outlet[T]
- Definition Classes
- SimpleLinearGraphStage
-
val
shape: FlowShape[T, T]
- Definition Classes
- SimpleLinearGraphStage → Graph
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
withAttributes(attr: Attributes): Graph[FlowShape[T, T], NotUsed]
- Definition Classes
- GraphStageWithMaterializedValue → Graph
- def →[B](y: B): (MapError[T], B)