public function exec($statement)
{
try {
return parent::exec($statement);
} catch (\Exception $e) {
throw $this->resolveException($e, $statement);
}
}
private function createDatabase() { if ($this->isInitialized) { return; } $databaseName = $this->databaseName = sprintf('%s_%d', $this->namePrefix, $this->processIdProvider->getPid()); $schemaManager = $this->connection->getSchemaManager(); $schemaManager->dropAndCreateDatabase($databaseName); $this->connection->exec("USE `{$databaseName}`"); $this->dataLoader->loadFiles($this->connection, $this->schemaFiles); $this->isInitialized = TRUE; }