From 447a049904bdadc2be2b3bdefbbb6415c514f31c Mon Sep 17 00:00:00 2001 From: Nathaniel Catchpole <catch@35733.no-reply.drupal.org> Date: Tue, 1 Sep 2015 21:10:34 +0100 Subject: [PATCH] Revert "Issue #2548725 by dawehner: Fix database exception handling, causing test fails in PostgreSQL" This reverts commit 4b7ba213160f7f3903a28d31e115a213b22d6090. --- .../Drupal/Core/Database/Driver/pgsql/Connection.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php index 5dec0a86d756..ff38a22c5b84 100644 --- a/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php +++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php @@ -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; } -- GitLab