Commit: 4ee62498b61802e5ffb255cd57c194f4b7a27668

Author: David Persson | Date: 2010-01-07 11:02:41 +0100
Wrapping PHPca application run into try/catch clause.
diff --git a/extensions/command/Syntax.php b/extensions/command/Syntax.php index 41ae9e3..168cdfb 100644 --- a/extensions/command/Syntax.php +++ b/extensions/command/Syntax.php @@ -65,7 +65,13 @@ class Syntax extends \lithium\console\Command implements \spriebsch\PHPca\Progre $config->setConfiguration(array()); $php = PHP_BINDIR . '/' . (substr(PHP_OS, 0, 3) == 'WIN' ? 'php.exe' : 'php'); - $result = $app->run($php, $path, $config); + + try { + $result = $app->run($php, $path, $config); + } catch (\Exception $e) { + $this->error($message = $e->getMessage()); + return $message == 'No PHP files to analyze'; + } if ($this->metrics) { $this->_metrics($result);