1 | <?php |
||
12 | class ExitException extends Exception { |
||
13 | /** |
||
14 | * @var bool |
||
15 | */ |
||
16 | protected $json = false; |
||
17 | /** |
||
18 | * ExitException constructor. |
||
19 | * |
||
20 | * @param int|string|string[] $message Error message (or code if no message) |
||
21 | * @param int $code HTTP status code |
||
22 | * @param Exception|null $previous |
||
23 | */ |
||
24 | 4 | function __construct ($message = '', $code = 0, Exception $previous = null) { |
|
41 | /** |
||
42 | * @return bool |
||
43 | */ |
||
44 | 4 | function getJson () { |
|
47 | /** |
||
48 | * Specify that error should be in JSON format |
||
49 | * |
||
50 | * @return $this |
||
51 | */ |
||
52 | 2 | function setJson () { |
|
56 | } |
||
57 |