Skip to content
Permalink
Browse files

Adding more doc blocks to error classes.

  • Loading branch information...
markstory committed Sep 4, 2010
1 parent 954676c commit cc17e1a85a8a27a39cab3fcda4e99f36fa00db57
Showing with 24 additions and 2 deletions.
  1. +24 −2 cake/libs/exceptions.php
@@ -19,16 +19,38 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
/**
* Represents an HTTP 404 error.
*
* @package cake.libs
*/
class Error404Exception extends RuntimeException {
/**
* Constructor
*
* @param string $message If no message is given 'Not Found' will be the message
* @param string $code Status code, defaults to 404
*/
public function __construct($message, $code = 404) {
if (empty($message)) {
$message = __('Not Found');
}
parent::__construct($message, $code);
}
}
class Error500Exception extends CakeException {
/**
* Represents an HTTP 500 error.
*
* @package cake.libs
*/
class Error500Exception extends CakeException {
/**
* Constructor
*
* @param string $message If no message is given 'Not Found' will be the message
* @param string $code Status code, defaults to 404
*/
public function __construct($message, $code = 500) {
if (empty($message)) {
$message = __('Internal Server Error');

0 comments on commit cc17e1a

Please sign in to comment.
You can’t perform that action at this time.