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.

BadRequestHttpException.php 1.1KB

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