選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

ExitException.php 1010B

1234567891011121314151617181920212223242526272829303132333435363738
  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. }