Revert "Issue #2548725 by dawehner: Fix database exception handling, causing test fails in PostgreSQL"
This reverts commit 4b7ba21316
.
8.0.x
parent
e53688fa26
commit
447a049904
|
@ -118,16 +118,7 @@ class Connection extends DatabaseConnection {
|
||||||
// Convert numeric values to strings when fetching.
|
// Convert numeric values to strings when fetching.
|
||||||
\PDO::ATTR_STRINGIFY_FETCHES => TRUE,
|
\PDO::ATTR_STRINGIFY_FETCHES => TRUE,
|
||||||
);
|
);
|
||||||
|
|
||||||
try {
|
|
||||||
$pdo = new \PDO($dsn, $connection_options['username'], $connection_options['password'], $connection_options['pdo']);
|
$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;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $pdo;
|
return $pdo;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue