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