Skip to content

Commit

Permalink
Add missed events to ExceptionRenderer.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jul 18, 2013
1 parent 20a14a7 commit b35ff7e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/Cake/Error/ExceptionRenderer.php
Expand Up @@ -26,6 +26,7 @@
use Cake\Controller\ErrorController;
use Cake\Core\Configure;
use Cake\Error;
use Cake\Event\Event;
use Cake\Network\Request;
use Cake\Network\Response;
use Cake\Routing\Router;
Expand Down Expand Up @@ -163,7 +164,8 @@ protected function _getController($exception) {
$controller->startupProcess();
} catch (\Exception $e) {
if (!empty($controller) && isset($controller->RequestHandler)) {
$controller->RequestHandler->startup($controller);
$event = new Event('Controller.startup', $controller, [$controller]);
$controller->RequestHandler->startup($event, $controller);
}
}
if (empty($controller)) {
Expand Down Expand Up @@ -279,7 +281,8 @@ public function pdoError(\PDOException $error) {
protected function _outputMessage($template) {
try {
$this->controller->render($template);
$this->controller->afterFilter();
$event = new Event('Controller.shutdown', $this->controller, [$this->controller]);
$this->controller->afterFilter($event);
$this->controller->response->send();
} catch (Error\MissingViewException $e) {
$attributes = $e->getAttributes();
Expand Down

0 comments on commit b35ff7e

Please sign in to comment.