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

35 行
1.1KB

  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\web;
  8. /**
  9. * BadRequestHttpException represents a "Bad Request" HTTP exception with status code 400.
  10. *
  11. * Use this exception to represent a generic client error. In many cases, there
  12. * may be an HTTP exception that more precisely describes the error. In that
  13. * case, consider using the more precise exception to provide the user with
  14. * additional information.
  15. *
  16. * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1
  17. * @author Qiang Xue <qiang.xue@gmail.com>
  18. * @since 2.0
  19. */
  20. class BadRequestHttpException extends HttpException
  21. {
  22. /**
  23. * Constructor.
  24. * @param string $message error message
  25. * @param integer $code error code
  26. * @param \Exception $previous The previous exception used for the exception chaining.
  27. */
  28. public function __construct($message = null, $code = 0, \Exception $previous = null)
  29. {
  30. parent::__construct(400, $message, $code, $previous);
  31. }
  32. }