[HttpKernel] fixed Exception classes to implement the full constructor
This commit is contained in:
parent
ab9be87354
commit
48b6057c3a
@ -18,12 +18,12 @@ namespace Symfony\Component\HttpKernel\Exception;
|
|||||||
*/
|
*/
|
||||||
class ForbiddenHttpException extends HttpException
|
class ForbiddenHttpException extends HttpException
|
||||||
{
|
{
|
||||||
public function __construct($message = '')
|
public function __construct($message = '', $code = 0, \Exception $previous)
|
||||||
{
|
{
|
||||||
if (!$message) {
|
if (!$message) {
|
||||||
$message = 'Forbidden';
|
$message = 'Forbidden';
|
||||||
}
|
}
|
||||||
|
|
||||||
parent::__construct($message, 403);
|
parent::__construct($message, 403, $previous);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,12 +18,12 @@ namespace Symfony\Component\HttpKernel\Exception;
|
|||||||
*/
|
*/
|
||||||
class NotFoundHttpException extends HttpException
|
class NotFoundHttpException extends HttpException
|
||||||
{
|
{
|
||||||
public function __construct($message = '')
|
public function __construct($message = '', $code = 0, \Exception $previous)
|
||||||
{
|
{
|
||||||
if (!$message) {
|
if (!$message) {
|
||||||
$message = 'Not Found';
|
$message = 'Not Found';
|
||||||
}
|
}
|
||||||
|
|
||||||
parent::__construct($message, 404);
|
parent::__construct($message, 404, $previous);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,12 +18,12 @@ namespace Symfony\Component\HttpKernel\Exception;
|
|||||||
*/
|
*/
|
||||||
class UnauthorizedHttpException extends HttpException
|
class UnauthorizedHttpException extends HttpException
|
||||||
{
|
{
|
||||||
public function __construct($message = '')
|
public function __construct($message = '', $code = 0, \Exception $previous)
|
||||||
{
|
{
|
||||||
if (!$message) {
|
if (!$message) {
|
||||||
$message = 'Unauthorized';
|
$message = 'Unauthorized';
|
||||||
}
|
}
|
||||||
|
|
||||||
parent::__construct($message, 401);
|
parent::__construct($message, 401, $previous);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user