class DefaultExceptionSubscriber

Last-chance handler for exceptions.

This handler will catch any exceptions not caught elsewhere and report them as an error page.

Hierarchy

File

core/lib/Drupal/Core/EventSubscriber/DefaultExceptionSubscriber.php, line 23

Namespace

Drupal\Core\EventSubscriber

Members

Name Modifiers Type Description
DefaultExceptionSubscriber::$configFactory protected property The config factory.
DefaultExceptionSubscriber::$errorLevel protected property One of the error level constants defined in bootstrap.inc.
DefaultExceptionSubscriber::getErrorLevel protected function Gets the configured error level.
DefaultExceptionSubscriber::getFormat protected function Gets the error-relevant format from the request.
DefaultExceptionSubscriber::getSubscribedEvents public static function Registers the methods in this class that should be listeners. Overrides EventSubscriberInterface::getSubscribedEvents
DefaultExceptionSubscriber::onException public function Handles errors for this subscriber.
DefaultExceptionSubscriber::onFormatUnknown protected function Handles an HttpExceptionInterface exception for unknown formats.
DefaultExceptionSubscriber::onHtml protected function Handles any exception as a generic error page for HTML.
DefaultExceptionSubscriber::onJson protected function Handles any exception as a generic error page for JSON.
DefaultExceptionSubscriber::__construct public function Constructs a new DefaultExceptionSubscriber.
StringTranslationTrait::$stringTranslation protected property The string translation service.
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use.
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!EventSubscriber!DefaultExceptionSubscriber.php/class/DefaultExceptionSubscriber/8.1.x