Skip to content

Commit

Permalink
Merge pull request #904 from davidmaes/remove-superflous-if-in-catch
Browse files Browse the repository at this point in the history
Remove superflous if in catch
  • Loading branch information
alcaeus committed Feb 3, 2019
2 parents a7f09da + 8375bc8 commit dc8feee
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions ConnectionFactory.php
Expand Up @@ -82,18 +82,15 @@ private function getDatabasePlatform(Connection $connection)
{
try {
return $connection->getDatabasePlatform();
} catch (DBALException $driverException) {
if ($driverException instanceof DriverException) {
throw new DBALException(
'An exception occured while establishing a connection to figure out your platform version.' . PHP_EOL .
"You can circumvent this by setting a 'server_version' configuration value" . PHP_EOL . PHP_EOL .
'For further information have a look at:' . PHP_EOL .
'https://github.com/doctrine/DoctrineBundle/issues/673',
0,
$driverException
);
}
throw $driverException;
} catch (DriverException $driverException) {
throw new DBALException(
'An exception occured while establishing a connection to figure out your platform version.' . PHP_EOL .
"You can circumvent this by setting a 'server_version' configuration value" . PHP_EOL . PHP_EOL .
'For further information have a look at:' . PHP_EOL .
'https://github.com/doctrine/DoctrineBundle/issues/673',
0,
$driverException
);
}
}

Expand Down

0 comments on commit dc8feee

Please sign in to comment.