diff --git a/src/Infrastructure/Drivers/DbalDriver.php b/src/Infrastructure/Drivers/DbalDriver.php index 7e43518..f89633d 100644 --- a/src/Infrastructure/Drivers/DbalDriver.php +++ b/src/Infrastructure/Drivers/DbalDriver.php @@ -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; @@ -61,7 +62,7 @@ public function check() /** * @return bool * - * @throws MalformedDriverConfigException + * @throws DriverConnectionException */ public function connect() { @@ -71,7 +72,7 @@ public function connect() return true; } catch (DBALException $e) { - + throw new DriverConnectionException($e->getMessage()); } } diff --git a/src/Infrastructure/Drivers/Exceptions/DriverConnectionException.php b/src/Infrastructure/Drivers/Exceptions/DriverConnectionException.php new file mode 100644 index 0000000..d401109 --- /dev/null +++ b/src/Infrastructure/Drivers/Exceptions/DriverConnectionException.php @@ -0,0 +1,15 @@ + + * + * 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 +{ +}