PHP Class Crud\Error\ExceptionRenderer

Licensed under The MIT License For full copyright and license information, please see the LICENSE.txt
Inheritance: extends Cake\Error\ExceptionRenderer
Datei anzeigen Open project: friendsofcake/crud

Public Methods

Method Description
validation ( Crud\Error\Exception\ValidationException $error ) : Response Renders validation errors and sends a 422 error code

Protected Methods

Method Description
_getErrorData ( ) : array Helper method used to generate extra debugging data into the error template
_getQueryLog ( ) : array Helper method to get query log.
_outputMessage ( string $template ) : Response Generate the response using the controller object.

Method Details

_getErrorData() protected method

Helper method used to generate extra debugging data into the error template
protected _getErrorData ( ) : array
return array debugging data

_getQueryLog() protected method

Helper method to get query log.
protected _getQueryLog ( ) : array
return array Query log.

_outputMessage() protected method

If there is no specific template for the raised error (normally there won't be one) swallow the missing view exception and just use the standard error format. This prevents throwing an unknown Exception and seeing instead a MissingView exception
protected _outputMessage ( string $template ) : Response
$template string The template to render.
return Cake\Network\Response

validation() public method

Renders validation errors and sends a 422 error code
public validation ( Crud\Error\Exception\ValidationException $error ) : Response
$error Crud\Error\Exception\ValidationException Exception instance
return Cake\Network\Response