com.twitter.finagle

Failure

final case class Failure extends RuntimeException with NoStacktrace with Product with Serializable

Base exception for all Finagle originated failures. These are RuntimeExceptions, but with additional sources and flags. Sources describe the origins of the failure to aid in debugging and flags mark attributes of the Failure (e.g. Retryable). Failures are constructed and extracted using the Failure companion object.

val failure = Failure.InterruptedBy(cause).withRetryable(true)
val shouldRetry = failure match {
 case Failure.Retryable(_) => true
 case _ => false
}
Linear Supertypes
Serializable, Product, Equals, NoStacktrace, RuntimeException, Exception, Throwable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Failure
  2. Serializable
  3. Product
  4. Equals
  5. NoStacktrace
  6. RuntimeException
  7. Exception
  8. Throwable
  9. Serializable
  10. AnyRef
  11. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def addSuppressed(arg0: Throwable): Unit

    Definition Classes
    Throwable
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. val cause: Throwable

  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def fillInStackTrace(): NoStacktrace

    Definition Classes
    NoStacktrace → Throwable
  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. val flags: Long

  14. def getCause(): Throwable

    Definition Classes
    Throwable
  15. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  16. def getLocalizedMessage(): String

    Definition Classes
    Throwable
  17. def getMessage(): String

    Definition Classes
    Throwable
  18. def getStackTrace(): Array[StackTraceElement]

    Definition Classes
    Failure → Throwable
  19. final def getSuppressed(): Array[Throwable]

    Definition Classes
    Throwable
  20. def initCause(arg0: Throwable): Throwable

    Definition Classes
    Throwable
  21. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  25. def printStackTrace(p: PrintWriter): Unit

    Definition Classes
    Failure → Throwable
  26. def printStackTrace(arg0: PrintStream): Unit

    Definition Classes
    Throwable
  27. def printStackTrace(): Unit

    Definition Classes
    Throwable
  28. def setStackTrace(arg0: Array[StackTraceElement]): Unit

    Definition Classes
    Throwable
  29. val sources: Map[String, AnyRef]

  30. val stacktrace: Array[StackTraceElement]

  31. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  32. def toString(): String

    Definition Classes
    Failure → Throwable → AnyRef → Any
  33. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  34. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  35. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  36. val why: String

  37. def withRetryable(on: Boolean): Failure

    Creates a new Failure that toggles retryable based on the given boolean.

  38. def withSource(key: String, value: AnyRef): Failure

    Creates a new Failure with the given key value pair prepended to sources.

  39. def withStackTrace(): Failure

    Creates a new Failure with the current threads stacktrace.

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from NoStacktrace

Inherited from RuntimeException

Inherited from Exception

Inherited from Throwable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped