Packages

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
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. Protected

Instance Constructors

  1. new DefaultHttpErrorHandler(environment: Environment, configuration: Configuration, sourceMapper: OptionalSourceMapper, router: Provider[Router])
    Annotations
    @Inject()
  2. new DefaultHttpErrorHandler(environment: Environment, configuration: Configuration, sourceMapper: Option[SourceMapper], router: => Option[Router])

    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)

    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. def onClientError(request: RequestHeader, statusCode: Int, message: String): Future[Result]

    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
  2. def onServerError(request: RequestHeader, exception: Throwable): Future[Result]

    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
  3. def setPlayEditor(editor: String): Unit

    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.