use BEAR\Sunday\Extension\Router\RouterMatch as Request;
10
use BEAR\Sunday\Extension\Transfer\TransferInterface;
11
use Exception;
12
13
/**
14
* vnd.error for BEAR.Package
15
*
16
* @see https://github.com/blongden/vnd.error
17
*/
18
final class ErrorHandler implements ErrorInterface
19
{
20
private ResourceObject|null $errorPage = null;
21
22
public function __construct(
23
private TransferInterface $responder,
24
private ErrorLogger $logger,
25
private ErrorPageFactoryInterface $factory,
26
) {
27
}
28
29
/**
30
* {@inheritDoc}
31
*/
32
public function handle(Exception $e, Request $request) // phpcs:ignore SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly.ReferencedGeneralException