Adding more doc blocks to error classes.

This commit is contained in:
Mark Story 2010-09-04 19:18:14 -04:00
parent 954676c9f6
commit cc17e1a85a

View file

@ -19,8 +19,18 @@
* @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');
@ -28,7 +38,19 @@ class Error404Exception extends RuntimeException {
parent::__construct($message, $code);
}
}
/**
* 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');