Skip to content

Commit

Permalink
PDOException is now handled by ExceptionHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
Data33 committed Sep 23, 2016
1 parent bd9acdf commit c9125f3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Illuminate/Database/Connectors/ConnectionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,16 @@ protected function createPdoResolverWithHosts(array $config)
shuffle($hosts);
}

$lastHost = end($hosts);
foreach ($hosts as $host) {
$config['host'] = $host;

try {
return $this->createConnector($config)->connect($config);
} catch (PDOException $e) {
//
if ($host !== $lastHost) {
$this->container->make('Illuminate\Contracts\Debug\ExceptionHandler')->report($e);
}
}
}

Expand Down

0 comments on commit c9125f3

Please sign in to comment.