class ExceptionSubscriber implements EventSubscriberInterface (View source)

Class ExceptionSubscriber

Properties

protected LoggerInterface $logger
protected bool $debug
protected ExceptionViewer $viewer

Methods

__construct(Kernel $kernel, ThemeResolver $themeResolver, LoggerInterface $logger, bool $debug = false)

ExceptionSubscriber constructor.

static array
getSubscribedEvents()

No description

onKernelException(GetResponseForExceptionEvent $event)

No description

Response
getEmergencyResponse(Exception $e, Request $request)

Create an emergency response to be sent instead of error logs.

bool|Theme
isNotFoundExceptionWithTheme(GetResponseForExceptionEvent $event)

No description

Response
createThemeNotFoundResponse(Theme $theme, Exception $exception)

No description

Details

__construct(Kernel $kernel, ThemeResolver $themeResolver, LoggerInterface $logger, bool $debug = false)

ExceptionSubscriber constructor.

Parameters

Kernel $kernel
ThemeResolver $themeResolver
LoggerInterface $logger
bool $debug

static array getSubscribedEvents()

Return Value

array

onKernelException(GetResponseForExceptionEvent $event)

Parameters

GetResponseForExceptionEvent $event

protected Response getEmergencyResponse(Exception $e, Request $request)

Create an emergency response to be sent instead of error logs.

Parameters

Exception $e
Request $request

Return Value

Response

protected bool|Theme isNotFoundExceptionWithTheme(GetResponseForExceptionEvent $event)

Parameters

GetResponseForExceptionEvent $event

Return Value

bool|Theme

protected Response createThemeNotFoundResponse(Theme $theme, Exception $exception)

Parameters

Theme $theme
Exception $exception

Return Value

Response