| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | protected function doException(\Exception $e) |
||
| 31 | { |
||
| 32 | $command = new DefaultConsoleCommand(); |
||
| 33 | $command->data = '"Error #' . $e->getCode() . ' - ' . $e->getMessage() . '"'; |
||
| 34 | $command->execute(); |
||
| 35 | |||
| 36 | $response = (new ResponseInjector)->build(); |
||
| 37 | $response = $response->withHeader('status', (string)(int)$command->result); // TODO: hack for select cli stream |
||
| 38 | |||
| 39 | $stream = $response->getBody(); |
||
| 40 | $stream->write($command->message); |
||
| 41 | |||
| 42 | return $response->withBody($stream); |
||
| 43 | } |
||
| 44 | } |