- Reworked ApplicationStrategy to allows better overridding of it's classes
This commit is contained in:
1 parent
156defddc9
commit
7a48d707e0
6 files changed
+118
-45
No files matched your search
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Lean\ApplicationStrategy;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Http\Server\MiddlewareInterface;
|
||||
use Psr\Http\Server\RequestHandlerInterface;
|
||||
|
||||
class ThrowableHandler implements ThrowableHandlerInterface
|
||||
{
|
||||
public function process(
|
||||
ServerRequestInterface $request,
|
||||
RequestHandlerInterface $handler
|
||||
): ResponseInterface {
|
||||
try {
|
||||
return $handler->handle($request);
|
||||
} catch (Throwable $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user