Skip to content
Snippets Groups Projects
Commit 447a0499 authored by catch's avatar catch
Browse files

Revert "Issue #2548725 by dawehner: Fix database exception handling, causing...

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

This reverts commit 4b7ba213.
parent e53688fa
No related merge requests found
......@@ -118,16 +118,7 @@ public static function open(array &$connection_options = array()) {
// 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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment