Total Complexity | 3 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class BaseException extends Exception |
||
9 | { |
||
10 | protected mixed $body; |
||
11 | |||
12 | public function __construct($message = "", $body = [], $code = 0, Throwable $previous = null) |
||
13 | { |
||
14 | $this->body = $body; |
||
15 | if (!empty($body)) { |
||
16 | $message = $message . " ->\n" . json_encode($body, JSON_PRETTY_PRINT) . "\n"; |
||
17 | } |
||
18 | parent::__construct($message, $code, $previous); |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * @return mixed |
||
23 | */ |
||
24 | public function getBody(): mixed |
||
27 | } |
||
28 | } |
||
29 |