Catch any possible exception and display its error message, stopping console command execution.

parent f75b46c2
......@@ -32,7 +32,12 @@ class DownloadModuleCommand extends Command
public function fire()
{
$downloader = new Downloader($this->getOutput());
$downloader->download($this->argument('name'));
try {
$downloader->download($this->argument('name'));
} catch (\Exception $e) {
$this->output->writeln("<error>{$e->getMessage()}</error>");
return;
}
$name = $this->extractPackageNameFrom($this->argument('name'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment