Skip to content

Commit

Permalink
Merge pull request #31 from mathroc/master
Browse files Browse the repository at this point in the history
fix code against a subtype
  • Loading branch information
mathroc committed Nov 21, 2015
2 parents c8ab6ae + 5f97dd2 commit 3ae8468
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/RetryStrategy/MysqlRetryStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ private function errorCodeStrategies() {

private function errorCode(DBALException $exception)
{
return $exception->getErrorCode();
if ($exception instanceof DriverException) {
return $exception->getErrorCode();
}
}
}
1 change: 0 additions & 1 deletion src/RetryStrategy/PostgreSQLRetryStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Ez\DbLinker\RetryStrategy;

use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Exception\DriverException;
use Ez\DbLinker\RetryStrategy as RetryStrategyInterface;

class PostgreSQLRetryStrategy implements RetryStrategyInterface
Expand Down

0 comments on commit 3ae8468

Please sign in to comment.