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

Breadcrumb

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

function YamlPecl::errorHandler

Handles errors for \Drupal\Component\Serialization\YamlPecl::decode().

Parameters

int $severity: The severity level of the error.

string $message: The error message to display.

See also

\Drupal\Component\Serialization\YamlPecl::decode()

File

core/lib/Drupal/Component/Serialization/YamlPecl.php, line 70

Class

YamlPecl
Provides default serialization for YAML using the PECL extension.

Namespace

Drupal\Component\Serialization

Code

public static function errorHandler($severity, $message) {
    restore_error_handler();
    throw new InvalidDataTypeException($message, $severity);
}

API Navigation

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