1: <?php
2: /**
3: * CHttpException class file.
4: *
5: * @author Qiang Xue <qiang.xue@gmail.com>
6: * @link http://www.yiiframework.com/
7: * @copyright 2008-2013 Yii Software LLC
8: * @license http://www.yiiframework.com/license/
9: */
10:
11: /**
12: * CHttpException represents an exception caused by invalid operations of end-users.
13: *
14: * The HTTP error code can be obtained via {@link statusCode}.
15: * Error handlers may use this status code to decide how to format the error page.
16: *
17: * @author Qiang Xue <qiang.xue@gmail.com>
18: * @package system.base
19: * @since 1.0
20: */
21: class CHttpException extends CException
22: {
23: /**
24: * @var integer HTTP status code, such as 403, 404, 500, etc.
25: */
26: public $statusCode;
27:
28: /**
29: * Constructor.
30: * @param integer $status HTTP status code, such as 404, 500, etc.
31: * @param string $message error message
32: * @param integer $code error code
33: */
34: public function __construct($status,$message=null,$code=0)
35: {
36: $this->statusCode=$status;
37: parent::__construct($message,$code);
38: }
39: }
40: