private function checkDatabase()
{
try {
if (!$this->configuredDatabaseExists()) {
$this->output->writeln(sprintf("The configured database '%s' does not exist", $this->db->getDatabase()));
exit(self::EXIT_DATABASE_NOT_FOUND_ERROR);
}
} catch (ConnectionException $e) {
$this->output->writeln('An error occured connecting to the database:');
$this->output->writeln($e->getMessage());
$this->output->writeln('Please check the database configuration in parameters.yml');
exit(self::EXIT_GENERAL_DATABASE_ERROR);
}
}