Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Move OptionParser initialization out of try block.
This allows exceptions that result from creating the optionparser to
display to the developer, making debugging easier.

Fixes #3157
  • Loading branch information
markstory committed Aug 28, 2012
1 parent 7135ff2 commit fba17cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Console/Shell.php
Expand Up @@ -361,8 +361,8 @@ public function runCommand($command, $argv) {
array_shift($argv);
}

$this->OptionParser = $this->getOptionParser();
try {
$this->OptionParser = $this->getOptionParser();
list($this->params, $this->args) = $this->OptionParser->parse($argv, $command);
} catch (ConsoleException $e) {
$this->out($this->OptionParser->help($command));
Expand Down

0 comments on commit fba17cf

Please sign in to comment.