function FinalExceptionSubscriber::getSubscribedEvents

Same name in other branches
  1. 9 core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php \Drupal\Core\EventSubscriber\FinalExceptionSubscriber::getSubscribedEvents()
  2. 8.9.x core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php \Drupal\Core\EventSubscriber\FinalExceptionSubscriber::getSubscribedEvents()
  3. 10 core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php \Drupal\Core\EventSubscriber\FinalExceptionSubscriber::getSubscribedEvents()

File

core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php, line 174

Class

FinalExceptionSubscriber
Last-chance handler for exceptions: the final exception subscriber.

Namespace

Drupal\Core\EventSubscriber

Code

public static function getSubscribedEvents() : array {
    // Listen on 4xx exceptions late, but before the final exception handler.
    $events[KernelEvents::EXCEPTION][] = [
        'on4xx',
        -250,
    ];
    // Run as the final (very late) KernelEvents::EXCEPTION subscriber.
    $events[KernelEvents::EXCEPTION][] = [
        'onException',
        -256,
    ];
    return $events;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.