Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
HttpStatusException | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace PeServer\Core\Throws; |
6 | |
7 | use Throwable; |
8 | use PeServer\Core\Http\HttpStatus; |
9 | use PeServer\Core\Throws\CoreException; |
10 | |
11 | final class HttpStatusException extends CoreException |
12 | { |
13 | public HttpStatus $status; |
14 | |
15 | public function __construct(HttpStatus $status, string $message = '', ?Throwable $previous = null) |
16 | { |
17 | $this->status = $status; |
18 | |
19 | parent::__construct($message, $status->value, $previous); |
20 | } |
21 | } |