public getExitCodeText ( ) : null | string | ||
return | null | string | A string representation for the exit status code, null if the Process is not terminated |
public function getExitCodeText()
{
if (null === ($exitcode = $this->getExitCode())) {
return;
}
return isset(self::$exitCodes[$exitcode]) ? self::$exitCodes[$exitcode] : 'Unknown error';
}
public function run(OutputInterface $output) { foreach ($this->queue as $command) { $process = new Process($command); if ($process->run()) { $output->writeln(sprintf('<error>%s:</error>', $process->getExitCodeText())); $output->writeln(''); $output->writeln(sprintf('<error>%s</error>', $process->getErrorOutput())); return $process->getExitCode(); } else { $output->writeln(sprintf('<info>%s</info>', $process->getExitCodeText())); } } // Ok return 0; }