Class

com.twitter.finatra.thrift.exceptions

ExceptionManager

Related Doc: package exceptions

Permalink

class ExceptionManager extends AnyRef

A class to register com.twitter.finatra.thrift.exceptions.ExceptionMappers and handle exceptions

Given an exception, the ExceptionManager will find an com.twitter.finatra.thrift.exceptions.ExceptionMapper to handle that particular class of exceptions. If the mapper for that exception isn't registered, the ExceptionManager will try the exception's parent class, until it reaches a Throwable class. If no Throwable class exception mapper is found, it won't handle the exception. Users are free to register their own ExceptionMapper[Throwable] which will be the root exception mapper.

Annotations
@Singleton()
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ExceptionManager
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ExceptionManager(injector: Injector, statsReceiver: StatsReceiver)

    Permalink

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def add[T <: Throwable](mapper: ExceptionMapper[T, _])(implicit arg0: Manifest[T]): Unit

    Permalink

    Add a com.twitter.finatra.thrift.exceptions.ExceptionMapper over type T to the manager.

    Add a com.twitter.finatra.thrift.exceptions.ExceptionMapper over type T to the manager. If a mapper has already been added for the given T, it will be replaced.

    T

    - exception class type which should be a subclass of java.lang.Throwable

    mapper

    - com.twitter.finatra.thrift.exceptions.ExceptionMapper to add

  5. def add[T <: ExceptionMapper[_, _]](implicit arg0: Manifest[T]): Unit

    Permalink

    Add a com.twitter.finatra.thrift.exceptions.ExceptionMapper by type T

    T

    - ExceptionMapper type T, which should be a subclass of com.twitter.finatra.thrift.exceptions.ExceptionMapper

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

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

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def handleException[Rep](throwable: Throwable): Future[Rep]

    Permalink

    Returns a Future[Rep] as computed by the matching com.twitter.finatra.thrift.exceptions.ExceptionMapper to the given throwable.

    Returns a Future[Rep] as computed by the matching com.twitter.finatra.thrift.exceptions.ExceptionMapper to the given throwable.

    throwable

    - java.lang.Throwable to match against registered ExceptionMappers.

    returns

    a response wrapped in Future

  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

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

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  19. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  20. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped