Removed unnecessary catched exceptions in commands (#421)
* Remove catch exception Because this is broken -vvv and don't show stack trace * Update DatabaseDropCommand.php * Update FixturesDumpCommand.php * Update TableDropCommand.php
This commit is contained in:
parent
830e68f344
commit
cdcb3f6b9f
4 changed files with 36 additions and 69 deletions
|
|
@ -54,27 +54,19 @@ class DatabaseCreateCommand extends AbstractCommand
|
|||
$query = 'CREATE DATABASE '. $dbName .';';
|
||||
}
|
||||
|
||||
try {
|
||||
$manager = new ConnectionManagerSingle();
|
||||
$manager->setConfiguration($this->getTemporaryConfiguration($config));
|
||||
$manager = new ConnectionManagerSingle();
|
||||
$manager->setConfiguration($this->getTemporaryConfiguration($config));
|
||||
|
||||
$serviceContainer = Propel::getServiceContainer();
|
||||
$serviceContainer->setAdapterClass($connectionName, $config['adapter']);
|
||||
$serviceContainer->setConnectionManager($connectionName, $manager);
|
||||
$serviceContainer = Propel::getServiceContainer();
|
||||
$serviceContainer->setAdapterClass($connectionName, $config['adapter']);
|
||||
$serviceContainer->setConnectionManager($connectionName, $manager);
|
||||
|
||||
$connection = Propel::getConnection($connectionName);
|
||||
$connection = Propel::getConnection($connectionName);
|
||||
|
||||
$statement = $connection->prepare($query);
|
||||
$statement->execute();
|
||||
$statement = $connection->prepare($query);
|
||||
$statement->execute();
|
||||
|
||||
$output->writeln(sprintf('<info>Database <comment>%s</comment> has been created.</info>', $dbName));
|
||||
} catch (\Exception $e) {
|
||||
$this->writeSection($output, array(
|
||||
'[Propel] Exception caught',
|
||||
'',
|
||||
$e->getMessage()
|
||||
), 'fg=white;bg=red');
|
||||
}
|
||||
$output->writeln(sprintf('<info>Database <comment>%s</comment> has been created.</info>', $dbName));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue