original_string: private function handleStartupErrors(): void
      {
          $selected = $this->selectErrorStream();
          if (false === $selected) {
              throw new \UnexpectedValueException('Something went wrong while selecting a stream.');
          }
  
          $errors = $this->readProcessErrors();
  
          if (is_resource($this->process) === false || empty($errors) === false) {
              throw new \UnexpectedValueException(
                  sprintf('The process "%s" could not be opened: ' . $errors, $this->command)
              );
          }
      }
code: private function handleStartupErrors(): void
      {
          $selected = $this->selectErrorStream();
          if (false === $selected) {
              throw new \UnexpectedValueException('Something went wrong while selecting a stream.');
          }
  
          $errors = $this->readProcessErrors();
  
          if (is_resource($this->process) === false || empty($errors) === false) {
              throw new \UnexpectedValueException(
                  sprintf('The process "%s" could not be opened: ' . $errors, $this->command)
              );
          }
      }
code_tokens: private function handleStartupErrors ( ) : void { $ selected = $ this -> selectErrorStream ( ) ; if ( false === $ selected ) { throw new \ UnexpectedValueException ( 'Something went wrong while selecting a stream.' ) ; } $ errors = $ this -> readProcessErrors ( ) ; if ( is_resource ( $ this -> process ) === false || empty ( $ errors ) === false ) { throw new \ UnexpectedValueException ( sprintf ( 'The process "%s" could not be opened: ' . $ errors , $ this -> command ) ) ; } }
docstring: Selects the STDERR stream, handles upcoming startup errors, and throws an exception, if any.
  
  @throws \UnexpectedValueException
docstring_tokens: Selects the STDERR stream handles upcoming startup errors and throws an exception if any .