diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 87a6402931..366e3b938b 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -18,6 +18,7 @@ Yii Framework 2 Change Log - Bug #9754: Fixed `yii\web\Request` error when path info is empty (dynasource) - Chg #9369: `Yii::$app->user->can()` now returns `false` instead of erroring in case `authManager` component is not configured (creocoder) - Chg #9411: `DetailView` now automatically sets container tag ID in case it's not specified (samdark) +- Enh #2106: Added Unprocessable Entity Http Exception (janfrs) - Enh #9635: Added default CSS class for `\yii\grid\ActionColumn` header (arogachev, dynasource) - Enh #9711: Added `yii\widgets\LinkPager::$pageCssClass` that allows to set default page class (ShNURoK42) diff --git a/framework/web/UnprocessableEntityHttpException.php b/framework/web/UnprocessableEntityHttpException.php new file mode 100644 index 0000000000..93403ad100 --- /dev/null +++ b/framework/web/UnprocessableEntityHttpException.php @@ -0,0 +1,35 @@ + + * @since 2.0.7 + */ +class UnprocessedEntityHttpException extends HttpException +{ + /** + * Constructor. + * @param string $message error message + * @param integer $code error code + * @param \Exception $previous The previous exception used for the exception chaining. + */ + public function __construct($message = null, $code = 0, \Exception $previous = null) + { + parent::__construct(422, $message, $code, $previous); + } +}