public static function ErrorHandler::register

Register the error handler.

Parameters

integer $level The level at which the conversion to Exception is done (null to use the error_reporting() value and 0 to disable):

Return value

The registered error handler

3 calls to ErrorHandler::register()
ErrorHandlerTest::testConstruct in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Debug/ErrorHandlerTest.php
ErrorHandlerTest::testHandle in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Debug/ErrorHandlerTest.php
Kernel::init in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ErrorHandler.php, line 42

Class

ErrorHandler
ErrorHandler.

Namespace

Symfony\Component\HttpKernel\Debug

Code

public static function register($level = null) {
  $handler = new static();
  $handler
    ->setLevel($level);
  set_error_handler(array(
    $handler,
    'handle',
  ));
  return $handler;
}