Class MapError<T>

  • All Implemented Interfaces:
    Graph<FlowShape<T,​T>,​NotUsed>, java.io.Serializable, scala.Equals, scala.Product, scala.Serializable

    public final class MapError<T>
    extends GraphStages.SimpleLinearGraphStage<T>
    implements scala.Product, scala.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 operator 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.

    See Also:
    Serialized Form
    • Constructor Detail

      • MapError

        public MapError​(scala.PartialFunction<java.lang.Throwable,​java.lang.Throwable> f)
    • Method Detail

      • apply

        public static <T> MapError<T> apply​(scala.PartialFunction<java.lang.Throwable,​java.lang.Throwable> f)
      • unapply

        public static <T> scala.Option<scala.PartialFunction<java.lang.Throwable,​java.lang.Throwable>> unapply​(MapError<T> x$0)
      • named

        public static Graph<S,​M> named​(java.lang.String name)
      • async

        public static Graph<S,​M> async()
      • async

        public static Graph<S,​M> async​(java.lang.String dispatcher)
      • async

        public static Graph<S,​M> async​(java.lang.String dispatcher,
                                             int inputBufferSize)
      • addAttributes

        public static Graph<S,​M> addAttributes​(Attributes attr)
      • initialAttributes

        protected static Attributes initialAttributes()
      • withAttributes

        public static final Graph<S,​M> withAttributes​(Attributes attr)
      • createLogicAndMaterializedValue

        public static final scala.Tuple2<GraphStageLogic,​NotUsed> createLogicAndMaterializedValue​(Attributes inheritedAttributes)
      • in

        public static Inlet<T> in()
      • out

        public static Outlet<T> out()
      • shape

        public static FlowShape<T,​T> shape()
      • f

        public scala.PartialFunction<java.lang.Throwable,​java.lang.Throwable> f()
      • copy

        public <T> MapError<T> copy​(scala.PartialFunction<java.lang.Throwable,​java.lang.Throwable> f)
      • copy$default$1

        public <T> scala.PartialFunction<java.lang.Throwable,​java.lang.Throwable> copy$default$1()
      • productPrefix

        public java.lang.String productPrefix()
        Specified by:
        productPrefix in interface scala.Product
      • productArity

        public int productArity()
        Specified by:
        productArity in interface scala.Product
      • productElement

        public java.lang.Object productElement​(int x$1)
        Specified by:
        productElement in interface scala.Product
      • productIterator

        public scala.collection.Iterator<java.lang.Object> productIterator()
        Specified by:
        productIterator in interface scala.Product
      • canEqual

        public boolean canEqual​(java.lang.Object x$1)
        Specified by:
        canEqual in interface scala.Equals
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object x$1)
        Specified by:
        equals in interface scala.Equals
        Overrides:
        equals in class java.lang.Object