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
This commit is contained in:
mark_story 2011-11-19 20:25:20 -05:00
parent 95b85118c7
commit 3e2f8ddf98

View file

@ -185,6 +185,8 @@ class ExceptionRenderer {
try {
$this->controller->set($error->getAttributes());
$this->_outputMessage($this->template);
} catch (MissingViewException $e) {
$this->_outputMessage('error500');
} catch (Exception $e) {
$this->_outputMessageSafe('error500');
}