| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | public function handleException(\Exception $e): void |
||
| 29 | { |
||
| 30 | $error = new \stdClass(); |
||
| 31 | $error->message = $e->getMessage(); |
||
| 32 | $error->code = $e->getCode(); |
||
| 33 | if (isset($e->HTTPBody)) { |
||
| 34 | $error->httpBody = $e->HTTPBody; |
||
| 35 | } |
||
| 36 | $error->call_stack = $this->formatCallStack($e); |
||
|
|
|||
| 37 | $error->host = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; |
||
| 38 | |||
| 39 | print(json_encode($error, JSON_PRETTY_PRINT)); |
||
| 40 | } |
||
| 42 |