Skip to content

Commit

Permalink
Adds UnsupportedMediaTypeHttpException for 415 Http errors
Browse files Browse the repository at this point in the history
  • Loading branch information
danschmidt5189 committed Jan 22, 2014
1 parent 81f3ce1 commit 20e031c
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions framework/web/UnsupportedMediaTypeHttpException.php
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);
}
}

0 comments on commit 20e031c

Please sign in to comment.