[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 2 and 3
orig
1
2
3
4
src/Lunr/Corona/RequestResultHandler.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/Exceptions/Tests/BadRequestExceptionBaseTest.php |
---|
src/Lunr/Corona/Exceptions/Tests/ForbiddenExceptionBaseTest.php |
---|
src/Lunr/Corona/Exceptions/Tests/HttpExceptionBaseTest.php |
---|
src/Lunr/Corona/Exceptions/Tests/HttpExceptionNoAppCodeTest.php |
---|
src/Lunr/Corona/Exceptions/Tests/HttpExceptionTest.php |
---|
src/Lunr/Corona/Exceptions/Tests/MethodNotAllowedExceptionBaseTest.php |
---|
src/Lunr/Corona/Exceptions/Tests/NotFoundExceptionBaseTest.php |
---|
src/Lunr/Corona/Exceptions/Tests/NotImplementedExceptionBaseTest.php |
---|
src/Lunr/Corona/Exceptions/Tests/PreconditionFailedExceptionBaseTest.php |
---|
src/Lunr/Corona/Exceptions/Tests/RequestedRangeNotSatisfiableExceptionBaseTest.php |
---|
src/Lunr/Corona/Exceptions/Tests/UnauthorizedExceptionBaseTest.php |
---|
src/Lunr/Corona/Exceptions/Tests/Helpers/HttpExceptionTest.php |
---|
src/Lunr/Corona/Tests/RequestResultHandlerSetResultTest.php |
---|
tests/phpunit.xml |
---|