Class MapError<T>

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

    public final class MapError<T>
    extends GraphStages.SimpleLinearGraphStage<T>
    implements scala.Product, java.io.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)
      • 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
      • productElementName

        public java.lang.String productElementName​(int x$1)
      • 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