Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usability and readability fixes #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
When an exception is caught, show the correct CLI usage
  • Loading branch information
saltybeagle committed Apr 7, 2011
commit bea38f7f23f920e296ce8dd9a7b31dd8b59009fa
5 changes: 3 additions & 2 deletions library/PHPTools/Namespacer/CLIRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ protected function _parseOptions(Namespacer $namespacer, array $options = array(
try {
$namespacer->setOptions($options);
$namespacer->convert();
} catch (\Exception $e) {
echo 'Exception caught ' . get_class($e) . ' : ' . $e->getMessage();
} catch(\Exception $e) {
echo 'Exception caught ' . get_class($e) . ' : ' . $e->getMessage() . PHP_EOL;
$this->_showHelp();
exit(1);
}

Expand Down