public static function YamlPecl::errorHandler in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Component/Serialization/YamlPecl.php \Drupal\Component\Serialization\YamlPecl::errorHandler()
- 10 core/lib/Drupal/Component/Serialization/YamlPecl.php \Drupal\Component\Serialization\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\SerializationCode
public static function errorHandler($severity, $message) {
restore_error_handler();
throw new InvalidDataTypeException($message, $severity);
}