Package

com.twitter.finatra.http

exceptions

Permalink

package exceptions

Visibility
  1. Public
  2. All

Type Members

  1. abstract class AbstractExceptionMapper[T <: Throwable] extends ExceptionMapper[T]

    Permalink

    AbstractExceptionMapper for usage from Java

  2. case class BadRequestException(mediaType: MediaType, errors: Seq[String]) extends HttpException with Product with Serializable

    Permalink
  3. case class ConflictException(mediaType: MediaType, errors: Seq[String]) extends HttpException with Product with Serializable

    Permalink
  4. class ExceptionManager extends AnyRef

    Permalink

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

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

    Given an exception, the ExceptionManager will find an com.twitter.finatra.http.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, and so on, until it reaches the Throwable class. The framework registers a "root" exception mapper over Throwable which will eventually be invoked. Users are free to register their own ExceptionMapper[Throwable] which overrides the "root" exception mapper.

    Annotations
    @Singleton()
    See also

    com.twitter.finatra.http.internal.exceptions.ThrowableExceptionMapper Note: When searching for the parent exception mapper, it would be nice to traverse the entire class linearization so it works for traits/mixins too [1]. Unfortunately, implementing this would require a lot more reflection and it might not be threadsafe [2]. Doing it in Scala 2.11 might be easier and safer. [1] http://stackoverflow.com/questions/15623498/handy-ways-to-show-linearization-of-a-class [2] http://docs.scala-lang.org/overviews/reflection/thread-safety.html

  5. trait ExceptionMapper[T <: Throwable] extends AnyRef

    Permalink

    An ExceptionMapper converts a T-typed throwable to an HTTP response.

    An ExceptionMapper converts a T-typed throwable to an HTTP response.

    Java users should use the AbstractExceptionMapper.

  6. class ExceptionMapperCollection extends Traversable[Manifest[ExceptionMapper[_]]]

    Permalink

    Represents a collection of com.twitter.finatra.http.exceptions.ExceptionMappers which is a Traversable[Manifest[ExceptionMapper[_\]\]\].

  7. case class ForbiddenException(mediaType: MediaType, errors: Seq[String]) extends HttpException with Product with Serializable

    Permalink
  8. class HttpException extends Exception

    Permalink
  9. class HttpNackException extends Exception with NoStackTrace

    Permalink
  10. class HttpResponseException extends Exception with NonRetryableException with NoStackTrace

    Permalink
  11. case class InternalServerErrorException(mediaType: MediaType, errors: Seq[String]) extends HttpException with Product with Serializable

    Permalink
  12. class MaxForwardsExceededException extends Exception

    Permalink
  13. case class NotAcceptableException(mediaType: MediaType, errors: Seq[String]) extends HttpException with Product with Serializable

    Permalink
  14. case class NotFoundException(mediaType: MediaType, errors: Seq[String]) extends HttpException with Product with Serializable

    Permalink
  15. case class ServiceUnavailableException(mediaType: MediaType, errors: Seq[String]) extends HttpException with Product with Serializable

    Permalink
  16. trait DefaultExceptionMapper extends ExceptionMapper[Throwable]

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 2016-09-07) Specially typing a default exception mapper is no longer necessary. Extend ExceptionMapper[Throwable] directly.

Value Members

  1. object BadRequestException extends Serializable

    Permalink
  2. object ConflictException extends Serializable

    Permalink
  3. object ForbiddenException extends Serializable

    Permalink
  4. object HttpException extends Serializable

    Permalink

    HttpException which will be rendered as an HTTP response.

  5. object InternalServerErrorException extends Serializable

    Permalink
  6. object NotAcceptableException extends Serializable

    Permalink
  7. object NotFoundException extends Serializable

    Permalink
  8. object ServiceUnavailableException extends Serializable

    Permalink

Ungrouped