[Corona] Catch exceptions in the FrontController
Review Request #554 — Created May 7, 2018 and submitted — Latest diff uploaded
Information | |
---|---|
pprkut | |
Lunr | |
pprkut:exceptions | |
576 | |
df96749... | |
Reviewers | |
lunr | |
Catch exceptions in a RequestResultHandler class, which can be used by either a FrontController or a Controller class.
The RequestResultHandler sets the proper response codes, which should remove boiler plate code from Controllers.
Unit tests
Changes between revision 1 and 2
orig
1
2
3
4
src/Lunr/Corona/FrontController.php |
---|
src/Lunr/Corona/RequestResultHandler.php |
---|
src/Lunr/Corona/RequestResultHandlerTrait.php |
---|
src/Lunr/Corona/Exceptions/BadRequestException.php |
---|
src/Lunr/Corona/Exceptions/ForbiddenException.php |
---|
src/Lunr/Corona/Exceptions/HttpException.php |
---|
src/Lunr/Corona/Exceptions/MethodNotAllowedException.php |
---|
src/Lunr/Corona/Exceptions/NotFoundException.php |
---|
src/Lunr/Corona/Exceptions/NotImplementedException.php |
---|
src/Lunr/Corona/Exceptions/PreconditionFailedException.php |
---|
src/Lunr/Corona/Exceptions/RequestedRangeNotSatisfiableException.php |
---|
src/Lunr/Corona/Exceptions/UnauthorizedException.php |
---|
src/Lunr/Corona/Tests/FrontControllerBaseTest.php |
---|
src/Lunr/Corona/Tests/FrontControllerDispatchTest.php |
---|
src/Lunr/Corona/Tests/FrontControllerTest.php |
---|
src/Lunr/Corona/Tests/RequestResultHandlerBaseTest.php |
---|
src/Lunr/Corona/Tests/RequestResultHandlerHandleRequestTest.php |
---|
src/Lunr/Corona/Tests/RequestResultHandlerSetResultTest.php |
---|
src/Lunr/Corona/Tests/RequestResultHandlerTest.php |
---|
src/Lunr/Corona/Tests/RequestResultHandlerTraitHandleRequestTest.php |
---|
src/Lunr/Corona/Tests/RequestResultHandlerTraitSetResultTest.php |
---|
src/Lunr/Corona/Tests/RequestResultHandlerTraitTest.php |
---|
tests/phpunit.xml |
---|