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]);
    }