Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ThrowableUtils.php

class ThrowableUtils

@internal

Hierarchy

  • class \Symfony\Component\ErrorHandler\ThrowableUtils

Expanded class hierarchy of ThrowableUtils

File

vendor/symfony/error-handler/ThrowableUtils.php, line 19

Namespace

Symfony\Component\ErrorHandler
View source
class ThrowableUtils {
    public static function getSeverity(SilencedErrorContext|\Throwable $throwable) : int {
        if ($throwable instanceof \ErrorException || $throwable instanceof SilencedErrorContext) {
            return $throwable->getSeverity();
        }
        if ($throwable instanceof \ParseError) {
            return \E_PARSE;
        }
        if ($throwable instanceof \TypeError) {
            return \E_RECOVERABLE_ERROR;
        }
        return \E_ERROR;
    }

}

Members

Title Sort descending Modifiers Object type Summary
ThrowableUtils::getSeverity public static function

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal