Skip to content

Commit

Permalink
Adding in support for AppError.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Sep 3, 2010
1 parent 2c7ef67 commit f2db197
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cake/libs/error_handler.php
Expand Up @@ -4,7 +4,7 @@
*
* Provides Error Capturing for Framework errors.
*
* PHP versions 4 and 5
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
Expand Down Expand Up @@ -99,6 +99,10 @@ function __construct(Exception $exception) {
if (method_exists($this->controller, 'apperror')) {
return $this->controller->appError($exception);
}
if (file_exists(APP . 'app_error.php') && class_exists('AppError')) {
$AppError = new AppError($exception);
return $AppError->render();
}
$method = $template = Inflector::variable(str_replace('Exception', '', get_class($exception)));

if ($exception instanceof CakeException && !in_array($method, get_class_methods($this))) {
Expand Down

0 comments on commit f2db197

Please sign in to comment.