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

Breadcrumb

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

function ErrorHandler::parseAnonymousClass

Parse the error message by removing the anonymous class notation and using the parent class instead if possible.

2 calls to ErrorHandler::parseAnonymousClass()
ErrorHandler::handleError in vendor/symfony/error-handler/ErrorHandler.php
Handles errors by filtering then logging them according to the configured bit fields.
ErrorHandler::handleException in vendor/symfony/error-handler/ErrorHandler.php
Handles an exception by logging then forwarding it to another handler.

File

vendor/symfony/error-handler/ErrorHandler.php, line 743

Class

ErrorHandler
A generic ErrorHandler for the PHP engine.

Namespace

Symfony\Component\ErrorHandler

Code

private function parseAnonymousClass(string $message) : string {
    return preg_replace_callback('/[a-zA-Z_\\x7f-\\xff][\\\\a-zA-Z0-9_\\x7f-\\xff]*+@anonymous\\x00.*?\\.php(?:0x?|:[0-9]++\\$)?[0-9a-fA-F]++/', static fn($m) => class_exists($m[0], false) ? ((get_parent_class($m[0]) ?: key(class_implements($m[0]))) ?: 'class') . '@anonymous' : $m[0], $message);
}

API Navigation

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