Skip to content

Commit

Permalink
dbal driver
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauro Cassani committed Sep 19, 2017
1 parent 4932038 commit 11d8177
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Infrastructure/Drivers/DbalDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\DriverManager;
use SimpleEventStoreManager\Infrastructure\Drivers\Contracts\DriverInterface;
use SimpleEventStoreManager\Infrastructure\Drivers\Exceptions\DriverConnectionException;
use SimpleEventStoreManager\Infrastructure\Drivers\Exceptions\MalformedDriverConfigException;
use SimpleEventStoreManager\Infrastructure\Drivers\Exceptions\NotInstalledDriverCheckException;

Expand Down Expand Up @@ -61,7 +62,7 @@ public function check()
/**
* @return bool
*
* @throws MalformedDriverConfigException
* @throws DriverConnectionException
*/
public function connect()
{
Expand All @@ -71,7 +72,7 @@ public function connect()

return true;
} catch (DBALException $e) {

throw new DriverConnectionException($e->getMessage());
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
/**
* This file is part of the Simple EventStore Manager package.
*
* (c) Mauro Cassani<https://github.com/mauretto78>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace SimpleEventStoreManager\Infrastructure\Drivers\Exceptions;

class DriverConnectionException extends \Exception
{
}

0 comments on commit 11d8177

Please sign in to comment.