You are here

protected static function ExceptionJsonSubscriber::getPriority in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/EventSubscriber/ExceptionJsonSubscriber.php \Drupal\Core\EventSubscriber\ExceptionJsonSubscriber::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.

Return value

int The event priority of this subscriber.

Overrides HttpExceptionSubscriberBase::getPriority

File

core/lib/Drupal/Core/EventSubscriber/ExceptionJsonSubscriber.php, line 29
Contains \Drupal\Core\EventSubscriber\ExceptionJsonSubscriber.

Class

ExceptionJsonSubscriber
Default handling for JSON errors.

Namespace

Drupal\Core\EventSubscriber

Code

protected static function getPriority() {

  // This will fire after the most common HTML handler, since HTML requests
  // are still more common than JSON requests.
  return -75;
}