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)
            );
        }
    }
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)
            );
        }
    }
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 ) ) ; } }
Selects the STDERR stream, handles upcoming startup errors, and throws an exception, if any.

@throws \UnexpectedValueException
Selects the STDERR stream handles upcoming startup errors and throws an exception if any .