DefaultExceptionHtmlSubscriber
class DefaultExceptionHtmlSubscriber extends HttpExceptionSubscriberBase (View source)
Exception subscriber for handling core default HTML error pages.
Properties
| protected HttpKernelInterface | $httpKernel | The HTTP kernel. |
|
| protected LoggerInterface | $logger | The logger instance. |
|
| protected RedirectDestinationInterface | $redirectDestination | The redirect destination service. |
|
| protected UrlMatcherInterface | $accessUnawareRouter | A router implementation which does not check access. |
Methods
Specifies the request formats this subscriber will respond to.
Specifies the priority of all listeners in this class.
Handles errors for this subscriber.
Registers the methods in this class that should be listeners.
Constructs a new DefaultExceptionHtmlSubscriber.
Handles a 4xx error for HTML.
Handles a 401 error for HTML.
Handles a 403 error for HTML.
Handles a 404 error for HTML.
Makes a subrequest to retrieve the default error page.
Details
protected array
getHandledFormats()
Specifies the request formats this subscriber will respond to.
static protected int
getPriority()
Specifies the priority of all listeners in this class.
The default priority is 1, which is very low. To have listeners that have a "first attempt" at handling exceptions return a higher priority.
onException(ExceptionEvent $event)
Handles errors for this subscriber.
static array
getSubscribedEvents()
Registers the methods in this class that should be listeners.
__construct(HttpKernelInterface $http_kernel, LoggerInterface $logger, RedirectDestinationInterface $redirect_destination, UrlMatcherInterface $access_unaware_router)
Constructs a new DefaultExceptionHtmlSubscriber.
on4xx(ExceptionEvent $event)
Handles a 4xx error for HTML.
on401(ExceptionEvent $event)
Handles a 401 error for HTML.
on403(ExceptionEvent $event)
Handles a 403 error for HTML.
on404(ExceptionEvent $event)
Handles a 404 error for HTML.
protected
makeSubrequest(ExceptionEvent $event, string $url, int $status_code)
Makes a subrequest to retrieve the default error page.