- Simplified exception-handling (see demo project for examples).
- Optimised sample-project.
- Optimised and added further unit-tests.
- Optimised and bugfixes.
This commit is contained in:
Simon Sessingø
2016-10-20 08:31:21 +02:00
parent 4e054dccf5
commit a8620cbc70
13 changed files with 151 additions and 175 deletions
@@ -21,8 +21,14 @@ class CustomExceptionHandler implements IExceptionHandler {
// else we just throw the error
if($error->getCode() == 404) {
die(sprintf('An error occurred (%s):<br/>%s', $error->getCode(), $error->getMessage()));
// Return 404 path
$request->setUri('/404');
return $request;
}
throw $error;
}
}