[Corona] Catch exceptions in the FrontController

Review Request #554 — Created May 7, 2018 and submitted — Latest diff uploaded

pprkut
Lunr
pprkut:exceptions
576
df96749...
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

src/Lunr/Corona/RequestResultHandler.php
src/Lunr/Corona/Exceptions/BadRequestException.php
src/Lunr/Corona/Exceptions/ForbiddenException.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/FrontControllerTest.php
Loading...