You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1010B

  1. <?php
  2. /**
  3. * @link http://www.yiiframework.com/
  4. * @copyright Copyright (c) 2008 Yii Software LLC
  5. * @license http://www.yiiframework.com/license/
  6. */
  7. namespace yii\base;
  8. /**
  9. * ExitException represents a normal termination of an application.
  10. *
  11. * Do not catch ExitException. Yii will handle this exception to terminate the application gracefully.
  12. *
  13. * @author Qiang Xue <qiang.xue@gmail.com>
  14. * @since 2.0
  15. */
  16. class ExitException extends \Exception
  17. {
  18. /**
  19. * @var integer the exit status code
  20. */
  21. public $statusCode;
  22. /**
  23. * Constructor.
  24. * @param integer $status the exit status code
  25. * @param string $message error message
  26. * @param integer $code error code
  27. * @param \Exception $previous The previous exception used for the exception chaining.
  28. */
  29. public function __construct($status = 0, $message = null, $code = 0, \Exception $previous = null)
  30. {
  31. $this->statusCode = $status;
  32. parent::__construct($message, $code, $previous);
  33. }
  34. }