com.twitter.finagle

Failure

final class Failure extends Exception with NoStacktrace

Base exception for all Finagle originated failures. These are Exceptions, 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
NoStacktrace, Exception, Throwable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Failure
  2. NoStacktrace
  3. Exception
  4. Throwable
  5. Serializable
  6. AnyRef
  7. 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. def copy(why: String = why, cause: Throwable = cause, flags: Long = flags, sources: Map[String, AnyRef] = sources, stacktrace: Array[StackTraceElement] = stacktrace): Failure

  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(a: Any): Boolean

    Definition Classes
    Failure → AnyRef → Any
  13. def fillInStackTrace(): NoStacktrace

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

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

  16. def getCause(): Throwable

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

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

    Definition Classes
    Throwable
  19. def getMessage(): String

    Definition Classes
    Throwable
  20. def getSource(key: String): Option[AnyRef]

    Returns a source for a given key, if it exists.

  21. def getStackTrace(): Array[StackTraceElement]

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

    Definition Classes
    Throwable
  23. def hashCode(): Int

    Definition Classes
    Failure → AnyRef → Any
  24. def initCause(arg0: Throwable): Throwable

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

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

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

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

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

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

    Definition Classes
    Throwable
  31. def printStackTrace(): Unit

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

    Definition Classes
    Throwable
  33. val stacktrace: Array[StackTraceElement]

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

    Definition Classes
    AnyRef
  35. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. def withRetryable(on: Boolean): Failure

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

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

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

  41. def withStackTrace(): Failure

    Creates a new Failure with the current threads stacktrace.

Inherited from NoStacktrace

Inherited from Exception

Inherited from Throwable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped