original_string: public function exec($command)
      {
          $this->debug("Executing: $command");
          $output = $returnValue = null;
          exec($command, $output, $returnValue);
  
          if ($returnValue != 0) {
              throw new \RuntimeException('Error executing command: '
                  . $command . ' : ' . implode("\n", $output));
          }
  
          return implode("\n", $output);
      }
code: public function exec($command)
      {
          $this->debug("Executing: $command");
          $output = $returnValue = null;
          exec($command, $output, $returnValue);
  
          if ($returnValue != 0) {
              throw new \RuntimeException('Error executing command: '
                  . $command . ' : ' . implode("\n", $output));
          }
  
          return implode("\n", $output);
      }
code_tokens: public function exec ( $ command ) { $ this -> debug ( "Executing: $command" ) ; $ output = $ returnValue = null ; exec ( $ command , $ output , $ returnValue ) ; if ( $ returnValue != 0 ) { throw new \ RuntimeException ( 'Error executing command: ' . $ command . ' : ' . implode ( "\n" , $ output ) ) ; } return implode ( "\n" , $ output ) ; }
docstring: Execute a command and throw an exception if the return code is not 0.
  
  @param string $command Command to execute
  
  @return string Returns the output of the command as a string
  @throws \RuntimeException on error.
docstring_tokens: Execute a command and throw an exception if the return code is not 0 .