src/Task/Composer/AbstractComposerCommandTask.php
protected function executeCommand(BaseCommand $command, InputInterface $input, OutputInterface $output)
    {
        try {
            if (0 !== ($statusCode = $command->run($input, $output))) {
                throw new \RuntimeException('Error: command exit code was ' . $statusCode);
            }
        } catch (\Exception $exception) {
            throw new \RuntimeException($exception->getMessage(), $exception->getCode(), $exception);
        }
    }
protected function executeCommand(BaseCommand $command, InputInterface $input, OutputInterface $output)
    {
        try {
            if (0 !== ($statusCode = $command->run($input, $output))) {
                throw new \RuntimeException('Error: command exit code was ' . $statusCode);
            }
        } catch (\Exception $exception) {
            throw new \RuntimeException($exception->getMessage(), $exception->getCode(), $exception);
        }
    }
protected function executeCommand ( BaseCommand $ command , InputInterface $ input , OutputInterface $ output ) { try { if ( 0 !== ( $ statusCode = $ command -> run ( $ input , $ output ) ) ) { throw new \ RuntimeException ( 'Error: command exit code was ' . $ statusCode ) ; } } catch ( \ Exception $ exception ) { throw new \ RuntimeException ( $ exception -> getMessage ( ) , $ exception -> getCode ( ) , $ exception ) ; } }
Execute the command and throw exceptions on errors.

@param BaseCommand     $command The command to execute.

@param InputInterface  $input   The input to use.

@param OutputInterface $output The output to use.

@return void

@throws \RuntimeException On exceptions or when the command has an non zero exit code.
Execute the command and throw exceptions on errors .