Class/Object

play.api.http

DefaultHttpErrorHandler

Related Docs: object DefaultHttpErrorHandler | package http

Permalink

class DefaultHttpErrorHandler extends HttpErrorHandler

The default HTTP error handler.

This class is intended to be extended, allowing users to reuse some of the functionality provided here.

Annotations
@Singleton()
Source
HttpErrorHandler.scala
Linear Supertypes
HttpErrorHandler, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DefaultHttpErrorHandler
  2. HttpErrorHandler
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DefaultHttpErrorHandler(environment: Environment, configuration: Configuration, sourceMapper: OptionalSourceMapper, router: Provider[Router])

    Permalink
    Annotations
    @Inject()
  2. new DefaultHttpErrorHandler(environment: Environment, configuration: Configuration, sourceMapper: Option[SourceMapper], router: ⇒ Option[Router])

    Permalink

    environment

    The environment

    router

    An optional router. If provided, in dev mode, will be used to display more debug information when a handler can't be found. This is a lazy parameter, to avoid circular dependency issues, since the router may well depend on this.

  3. new DefaultHttpErrorHandler(config: HttpErrorConfig = HttpErrorConfig(), sourceMapper: Option[SourceMapper] = None, router: ⇒ Option[Router] = None)

    Permalink

    router

    An optional router. If provided, in dev mode, will be used to display more debug information when a handler can't be found. This is a lazy parameter, to avoid circular dependency issues, since the router may well depend on this.

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. final def asInstanceOf[T0]: T0

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  12. def logServerError(request: RequestHeader, usefulException: UsefulException): Unit

    Permalink

    Responsible for logging server errors.

    Responsible for logging server errors.

    This can be overridden to add additional logging information, eg. the id of the authenticated user.

    request

    The request that triggered the server error.

    usefulException

    The server error.

    Attributes
    protected
  13. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  16. def onBadRequest(request: RequestHeader, message: String): Future[Result]

    Permalink

    Invoked when a client makes a bad request.

    Invoked when a client makes a bad request.

    request

    The request that was bad.

    message

    The error message.

    Attributes
    protected
  17. def onClientError(request: RequestHeader, statusCode: Int, message: String): Future[Result]

    Permalink

    Invoked when a client error occurs, that is, an error in the 4xx series.

    Invoked when a client error occurs, that is, an error in the 4xx series.

    request

    The request that caused the client error.

    statusCode

    The error status code. Must be greater or equal to 400, and less than 500.

    message

    The error message.

    Definition Classes
    DefaultHttpErrorHandlerHttpErrorHandler
  18. def onDevServerError(request: RequestHeader, exception: UsefulException): Future[Result]

    Permalink

    Invoked in dev mode when a server error occurs.

    Invoked in dev mode when a server error occurs.

    request

    The request that triggered the error.

    exception

    The exception.

    Attributes
    protected
  19. def onForbidden(request: RequestHeader, message: String): Future[Result]

    Permalink

    Invoked when a client makes a request that was forbidden.

    Invoked when a client makes a request that was forbidden.

    request

    The forbidden request.

    message

    The error message.

    Attributes
    protected
  20. def onNotFound(request: RequestHeader, message: String): Future[Result]

    Permalink

    Invoked when a handler or resource is not found.

    Invoked when a handler or resource is not found.

    request

    The request that no handler was found to handle.

    message

    A message.

    Attributes
    protected
  21. def onOtherClientError(request: RequestHeader, statusCode: Int, message: String): Future[Result]

    Permalink

    Invoked when a client error occurs, that is, an error in the 4xx series, which is not handled by any of the other methods in this class already.

    Invoked when a client error occurs, that is, an error in the 4xx series, which is not handled by any of the other methods in this class already.

    request

    The request that caused the client error.

    statusCode

    The error status code. Must be greater or equal to 400, and less than 500.

    message

    The error message.

    Attributes
    protected
  22. def onProdServerError(request: RequestHeader, exception: UsefulException): Future[Result]

    Permalink

    Invoked in prod mode when a server error occurs.

    Invoked in prod mode when a server error occurs.

    Override this rather than onServerError if you don't want to change Play's debug output when logging errors in dev mode.

    request

    The request that triggered the error.

    exception

    The exception.

    Attributes
    protected
  23. def onServerError(request: RequestHeader, exception: Throwable): Future[Result]

    Permalink

    Invoked when a server error occurs.

    Invoked when a server error occurs.

    By default, the implementation of this method delegates to onProdServerError when in prod mode, and onDevServerError in dev mode. It is recommended, if you want Play's debug info on the error page in dev mode, that you override onProdServerError instead of this method.

    request

    The request that triggered the server error.

    exception

    The server error.

    Definition Classes
    DefaultHttpErrorHandlerHttpErrorHandler
  24. def setPlayEditor(editor: String): Unit

    Permalink

    Sets the play editor to the given string after initialization.

    Sets the play editor to the given string after initialization. Used for tests, or cases where the existing configuration isn't sufficient.

    editor

    the play editor string.

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

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

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

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

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

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

Inherited from HttpErrorHandler

Inherited from AnyRef

Inherited from Any

Ungrouped