Removing View::error(). Instead you should be handling error states in your controller, or throwing exceptions and letting the application error handling deal with the error.

This commit is contained in:
mark_story 2010-11-03 22:46:11 -04:00
parent 3f61fa004e
commit 540f1426be

View file

@ -599,21 +599,6 @@ class View extends Object {
$this->viewVars = $data + $this->viewVars;
}
/**
* Displays an error page to the user. Uses layouts/error.ctp to render the page.
*
* @param integer $code HTTP Error code (for instance: 404)
* @param string $name Name of the error (for instance: Not Found)
* @param string $message Error message as a web page
*/
public function error($code, $name, $message) {
header ("HTTP/1.1 {$code} {$name}");
print ($this->_render(
$this->_getLayoutFileName('error'),
array('code' => $code, 'name' => $name, 'message' => $message)
));
}
/**
* Magic accessor for helpers. Provides access to attributes that were deprecated.
*