public function register()
    {
        if (empty($this->formatterStack)) {
            throw new NoFormattersRegisteredException(
                'No formatters were registered before attempting to register the error handler'
            );
        }

        // We want the formatters we register to handle the errors.
        ini_set('display_errors', false);

        set_error_handler([$this, self::ERROR_HANDLER]);
        set_exception_handler([$this, self::EXCEPTION_HANDLER]);
        register_shutdown_function([$this, self::SHUTDOWN_HANDLER]);
    }
public function register()
    {
        if (empty($this->formatterStack)) {
            throw new NoFormattersRegisteredException(
                'No formatters were registered before attempting to register the error handler'
            );
        }

        // We want the formatters we register to handle the errors.
        ini_set('display_errors', false);

        set_error_handler([$this, self::ERROR_HANDLER]);
        set_exception_handler([$this, self::EXCEPTION_HANDLER]);
        register_shutdown_function([$this, self::SHUTDOWN_HANDLER]);
    }
public function register ( ) { if ( empty ( $ this -> formatterStack ) ) { throw new NoFormattersRegisteredException ( 'No formatters were registered before attempting to register the error handler' ) ; } // We want the formatters we register to handle the errors. ini_set ( 'display_errors' , false ) ; set_error_handler ( [ $ this , self :: ERROR_HANDLER ] ) ; set_exception_handler ( [ $ this , self :: EXCEPTION_HANDLER ] ) ; register_shutdown_function ( [ $ this , self :: SHUTDOWN_HANDLER ] ) ; }
Registers the error handlers, and is required to be called before the
error handling code is effective.

@throws \League\BooBoo\Exception\NoFormattersRegisteredException
Registers the error handlers and is required to be called before the error handling code is effective .