From cc17e1a85a8a27a39cab3fcda4e99f36fa00db57 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Sat, 4 Sep 2010 19:18:14 -0400 Subject: [PATCH] Adding more doc blocks to error classes. --- cake/libs/exceptions.php | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/cake/libs/exceptions.php b/cake/libs/exceptions.php index 3f969c8a5..817dc2d20 100644 --- a/cake/libs/exceptions.php +++ b/cake/libs/exceptions.php @@ -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); } } -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');