Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
100.00%
1 / 1
100.00%
2 / 2
CRAP
100.00%
4 / 4
HttpNotFoundException
100.00%
1 / 1
100.00%
2 / 2
3
100.00%
4 / 4
 __construct($code = null, $message = null, Exception $previous = null)
100.00%
1 / 1
2
100.00%
3 / 3
 getStatusCode()
100.00%
1 / 1
1
100.00%
1 / 1
<?php namespace Modulework\Modules\Http\Exceptions;
/*
* (c) Christian Gärtner <christiangaertner.film@googlemail.com>
* This file is part of the Modulework Framework
* License: View distributed LICENSE file
*/
use Exception;
/**
* HttpNotFoundException
* Should be thrown if a 404 should be send to the browser
*/
class HttpNotFoundException extends Exception implements HttpExceptionInterface
{
/**
* {@inheritdoc}
*/
public function __construct($code = null, $message = null, Exception $previous = null)
{
$code = $code ?: 404;
parent::__construct($message, $code, $previous);
}
public function getStatusCode()
{
return $this->code;
}