Skip to content

Commit

Permalink
Removing View::error(). Instead you should be handling error states i…
Browse files Browse the repository at this point in the history
…n your controller, or throwing exceptions and letting the application error handling deal with the error.
  • Loading branch information
markstory committed Nov 7, 2010
1 parent 3f61fa0 commit 540f142
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions cake/libs/view/view.php
Expand Up @@ -599,21 +599,6 @@ public function set($one, $two = null) {
$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.
*
Expand Down

0 comments on commit 540f142

Please sign in to comment.