object DevHttpErrorHandler extends DefaultHttpErrorHandler
A default HTTP error handler that can be used when there's no application available.
Note: this HttpErrorHandler should ONLY be used in DEV or TEST. The way this displays errors to the user is generally not suitable for a production environment.
- Source
- HttpErrorHandler.scala
- Alphabetic
- By Inheritance
- DevHttpErrorHandler
- DefaultHttpErrorHandler
- HttpErrorHandler
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fatalErrorMessage(request: RequestHeader, exception: Throwable): String
Invoked when handling a server error with this error handler failed.
Invoked when handling a server error with this error handler failed.
As a last resort this method allows you to return a (simple) error message that will be send along with a "500 Internal Server Error" response. It's highly recommended to just return a simple string, without doing any fancy processing inside the method (like accessing files,...) that could throw exceptions. This is your last chance to send a meaningful error message when everything else failed.
- request
The request that triggered the server error.
- exception
The server error.
- returns
An error message which will be send as last resort in case handling a server error with this error handler failed.
- Attributes
- protected
- Definition Classes
- DefaultHttpErrorHandler
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def logServerError(request: RequestHeader, usefulException: UsefulException): Unit
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
- Definition Classes
- DefaultHttpErrorHandler
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def onBadRequest(request: RequestHeader, message: String): Future[Result]
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
- Definition Classes
- DefaultHttpErrorHandler
- 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
- DevHttpErrorHandler → DefaultHttpErrorHandler → HttpErrorHandler
- def onDevServerError(request: RequestHeader, exception: UsefulException): Future[Result]
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
- Definition Classes
- DefaultHttpErrorHandler
- def onForbidden(request: RequestHeader, message: String): Future[Result]
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
- Definition Classes
- DefaultHttpErrorHandler
- def onNotFound(request: RequestHeader, message: String): Future[Result]
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
- Definition Classes
- DefaultHttpErrorHandler
- def onOtherClientError(request: RequestHeader, statusCode: Int, message: String): Future[Result]
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
- Definition Classes
- DefaultHttpErrorHandler
- def onProdServerError(request: RequestHeader, exception: UsefulException): Future[Result]
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
- Definition Classes
- DefaultHttpErrorHandler
- 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
- DevHttpErrorHandler → DefaultHttpErrorHandler → HttpErrorHandler
- 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.
- Definition Classes
- DefaultHttpErrorHandler
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)