public function DefaultExceptionSubscriber::onException in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/EventSubscriber/DefaultExceptionSubscriber.php \Drupal\Core\EventSubscriber\DefaultExceptionSubscriber::onException()
Handles errors for this subscriber.
Parameters
\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event: The event to process.
File
- core/
lib/ Drupal/ Core/ EventSubscriber/ DefaultExceptionSubscriber.php, line 174 - Contains \Drupal\Core\EventSubscriber\DefaultExceptionSubscriber.
Class
- DefaultExceptionSubscriber
- Last-chance handler for exceptions.
Namespace
Drupal\Core\EventSubscriberCode
public function onException(GetResponseForExceptionEvent $event) {
$format = $this
->getFormat($event
->getRequest());
// If it's an unrecognized format, assume HTML.
$method = 'on' . $format;
if (!method_exists($this, $method)) {
$method = 'onHtml';
}
$this
->{$method}($event);
}