Added a way to detect errors during Phing execution

This commit is contained in:
William DURAND 2011-06-20 09:41:00 +02:00
commit 4c07e38ce3
4 changed files with 52 additions and 30 deletions

View file

@ -41,10 +41,17 @@ EOT
if ($input->getOption('verbose')) {
$this->additionalPhingArgs[]= 'verbose';
}
$this->callPhing('om');
foreach ($this->tempSchemas as $schemaFile => $schemaDetails) {
$output->writeln(sprintf('Built Model classes for bundle <info>%s</info> from <comment>%s</comment>.', $schemaDetails['bundle'], $schemaDetails['path']));
if (true === $this->callPhing('om')) {
foreach ($this->tempSchemas as $schemaFile => $schemaDetails) {
$output->writeln(sprintf(
'Built Model classes for bundle <info>%s</info> from <comment>%s</comment>.',
$schemaDetails['bundle'],
$schemaDetails['path']
));
}
} else {
$output->writeln('<error>WARNING ! An error has occured.</error>');
}
}
}