You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
560 B
PHTML
24 lines
560 B
PHTML
6 years ago
|
<?php
|
||
|
|
||
|
namespace Engelsystem\Test\Unit\Middleware\Stub;
|
||
|
|
||
|
use Exception;
|
||
|
use Psr\Http\Message\ResponseInterface;
|
||
|
use Psr\Http\Message\ServerRequestInterface;
|
||
|
use Psr\Http\Server\RequestHandlerInterface;
|
||
|
|
||
|
class ExceptionMiddlewareHandler implements RequestHandlerInterface
|
||
|
{
|
||
|
/**
|
||
|
* Throws an exception
|
||
|
*
|
||
|
* @param ServerRequestInterface $request
|
||
|
* @return ResponseInterface
|
||
|
* @throws Exception
|
||
|
*/
|
||
|
public function handle(ServerRequestInterface $request): ResponseInterface
|
||
|
{
|
||
|
throw new Exception('Boooom!');
|
||
|
}
|
||
|
}
|