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 |
---|
__construct()
create( $arg0 = null, $arg1 = null) : \io\vertx\jphp\ext\web\handler\ErrorHandler
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)
boolean | string
boolean
\io\vertx\jphp\ext\web\handler\ErrorHandler
the handler
handle( $arg0) : void
RoutingContext
DEFAULT_ERROR_HANDLER_TEMPLATE
var |
php文件只是为了写代码方便,常量的实际值请参考原java文件 |
---|