forked from yiisoft/yii2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds UnsupportedMediaTypeHttpException for 415 Http errors
- Loading branch information
1 parent
81f3ce1
commit 20e031c
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
/** | ||
* @link http://www.yiiframework.com/ | ||
* @copyright Copyright (c) 2008 Yii Software LLC | ||
* @license http://www.yiiframework.com/license/ | ||
*/ | ||
|
||
namespace yii\web; | ||
|
||
/** | ||
* UnsupportedMediaTypeHttpException represents an "Unsupported Media Type" HTTP exception with status code 415. | ||
* | ||
* @author Dan Schmidt <danschmidt5189@gmail.com> | ||
* @since 2.0 | ||
*/ | ||
class UnsupportedMediaTypeHttpException 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(415, $message, $code, $previous); | ||
} | ||
} |