Revert "Issue #2548725 by dawehner: Fix database exception handling, causing test fails in PostgreSQL"

This reverts commit 4b7ba21316.
8.0.x
Nathaniel Catchpole 2015-09-01 21:10:34 +01:00
parent e53688fa26
commit 447a049904
1 changed files with 1 additions and 10 deletions

View File

@ -118,16 +118,7 @@ class Connection extends DatabaseConnection {
// Convert numeric values to strings when fetching.
\PDO::ATTR_STRINGIFY_FETCHES => TRUE,
);
try {
$pdo = new \PDO($dsn, $connection_options['username'], $connection_options['password'], $connection_options['pdo']);
}
catch (\Exception $e) {
if ($e->getCode() == static::DATABASE_NOT_FOUND) {
throw new DatabaseNotFoundException($e->getMessage(), $e->getCode(), $e);
}
throw new $e;
}
$pdo = new \PDO($dsn, $connection_options['username'], $connection_options['password'], $connection_options['pdo']);
return $pdo;
}