1 | <?php |
||
12 | final class HttpException extends Exception |
||
13 | { |
||
14 | private $httpStatusCode; |
||
15 | private $userMessage; |
||
16 | |||
17 | /** |
||
18 | * Constructs |
||
19 | * |
||
20 | * @param string $message @see Exception::__construct() |
||
21 | * @param int $httpStatusCode a valid http status code |
||
22 | * @param int $code @see Exception::__construct() |
||
23 | * @param Exception $previous @see Exception::__construct() |
||
24 | * @param string|null $userMessage a nicer message to display to the user sans sensitive details |
||
25 | */ |
||
26 | public function __construct( |
||
43 | |||
44 | /** |
||
45 | * Getter for $httpStatusCode |
||
46 | * |
||
47 | * @return int the http status code |
||
48 | */ |
||
49 | public function getHttpStatusCode() : int |
||
53 | |||
54 | /** |
||
55 | * Getter for $userMessage |
||
56 | * |
||
57 | * @return string the user message |
||
58 | */ |
||
59 | public function getUserMessage() : string |
||
63 | } |
||
64 |