Skip to content

Commit

Permalink
Fixed error handling
Browse files Browse the repository at this point in the history
Return != 0, when command fails. Also exit immediatly, when database cannot be fetched.
  • Loading branch information
hgiesenow committed Dec 9, 2015
1 parent 018d111 commit 3a4baf9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Command/FetchCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->fetchDatabase();
} catch (\Exception $exc) {
$this->progressErr($exc->getMessage());
$this->progressDone();

return 1;
}
$this->progressDone();
}
Expand All @@ -77,6 +80,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->fetchFiles();
} catch (\Exception $exc) {
$this->progressErr($exc->getMessage());
$this->progressDone();

return 1;
}
$this->progressDone();
}
Expand Down

0 comments on commit 3a4baf9

Please sign in to comment.