ErrorHandler

A pretty error handler for rendering error pages. When working in development mode exception details will be returned in the server responses, otherwise or when manually specified no exception details are returned in the HTTP response.

The reason the display of the exception details is by default dependent of the mode is to follow the security best practices: https://www.owasp.org/index.php/Improper_Error_Handling

package

Default

Methods

__construct

__construct() 

Create an error handler using defaults

create( $arg0 = null,  $arg1 = null) : \io\vertx\jphp\ext\web\handler\ErrorHandler
static

create()

Create an error handler

param $displayExceptionDetails [boolean] true if exception details should be displayed create($displayExceptionDetails)

Create an error handler

param $errorTemplateName [string] the error template name - will be looked up from the classpath create($errorTemplateName)

Create an error handler

param $errorTemplateName [string] the error template name - will be looked up from the classpath param $displayExceptionDetails [boolean] true if exception details should be displayed create($errorTemplateName, $displayExceptionDetails)

Arguments

$arg0

boolean | string

$arg1

boolean

Response

\io\vertx\jphp\ext\web\handler\ErrorHandler

the handler

Something has happened, so handle it.

handle( $arg0) : void

Arguments

$arg0

RoutingContext

Constants

The default template to use for rendering

DEFAULT_ERROR_HANDLER_TEMPLATE
var

php文件只是为了写代码方便,常量的实际值请参考原java文件