Package

com.twitter.finatra.thrift

exceptions

Permalink

package exceptions

Visibility
  1. Public
  2. All

Type Members

  1. class ExceptionManager extends AnyRef

    Permalink

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

    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()
  2. trait ExceptionMapper[T <: Throwable, Rep] extends AnyRef

    Permalink

    An ExceptionMapper converts a T-typed throwable to a Future[Rep].

  3. class FinatraThriftExceptionMapper extends ExceptionMapper[Exception, ThriftException] with Logging

    Permalink

    A generic com.twitter.finatra.thrift.exceptions.ExceptionMapper over the Exception exception type.

    A generic com.twitter.finatra.thrift.exceptions.ExceptionMapper over the Exception exception type. This mapper attempts to translate other exceptions to known finatra-thrift exceptions.

    We recommend for users to register this mapper in their scala Servers.

    Note: this is only applicable in scala since it is using thriftscala exceptions

    Annotations
    @Singleton()

Ungrouped