Allow ParseError as exception and remove typehint.

This commit is contained in:
Mark Scherer 2015-11-10 00:14:04 +01:00
parent ddfb7d649e
commit 7982b6b078
2 changed files with 4 additions and 4 deletions

View file

@ -109,11 +109,11 @@ class ErrorHandler {
* This will either use custom exception renderer class if configured,
* or use the default ExceptionRenderer.
*
* @param Exception $exception The exception to render.
* @param Exception|ParseError $exception The exception to render.
* @return void
* @see http://php.net/manual/en/function.set-exception-handler.php
*/
public static function handleException(Exception $exception) {
public static function handleException($exception) {
$config = Configure::read('Exception');
static::_log($exception, $config);

View file

@ -86,9 +86,9 @@ class ExceptionRenderer {
* If the error is a CakeException it will be converted to either a 400 or a 500
* code error depending on the code used to construct the error.
*
* @param Exception $exception Exception
* @param Exception|ParseError $exception Exception
*/
public function __construct(Exception $exception) {
public function __construct($exception) {
$this->controller = $this->_getController($exception);
if (method_exists($this->controller, 'appError')) {