| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 41 | 1 | public function exception(Request $request) |
|
| 42 | { |
||
| 43 | 1 | $ex = $request->getException(); |
|
| 44 | |||
| 45 | 1 | $this->response->setCode(500); |
|
| 46 | 1 | printf("<h2>%s</h2>", HttpStatus::getStatus(500)); |
|
| 47 | 1 | while ($ex != null) { |
|
| 48 | 1 | printf("<h3>%s</h3><pre>%s</pre>", $ex->getMessage(), $ex->getTraceAsString()); |
|
| 49 | 1 | $ex = $ex->getPrevious(); |
|
| 50 | } |
||
| 51 | 1 | } |
|
| 52 | } |
||
| 53 |