Permalink
Browse files

CakeException subclasses render correctly now.

CakeException subclasses without their own view files, would trigger
a MissingViewException, which would result in no application helpers
being used.  This could cause issues when app helpers are used
in the layout.

Instead a error500 template is rendered using app helpers.

Fixes #2274, fixes #2004
  • Loading branch information...
markstory committed Nov 20, 2011
1 parent 95b8511 commit 3e2f8ddf98289711289ffafabd79fed0c4238a59
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/Cake/Error/ExceptionRenderer.php
@@ -185,6 +185,8 @@ protected function _cakeError(CakeException $error) {
try {
$this->controller->set($error->getAttributes());
$this->_outputMessage($this->template);
+ } catch (MissingViewException $e) {
+ $this->_outputMessage('error500');
} catch (Exception $e) {
$this->_outputMessageSafe('error500');
}

0 comments on commit 3e2f8dd

Please sign in to comment.