Skip to content

Commit

Permalink
Catch Throwable in Connection::transactional()
Browse files Browse the repository at this point in the history
  • Loading branch information
fprochazka committed May 12, 2016
1 parent a32476f commit e30c77d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Doctrine/DBAL/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
use Doctrine\DBAL\Cache\ArrayStatement;
use Doctrine\DBAL\Cache\CacheException;
use Doctrine\DBAL\Driver\PingableConnection;
use Throwable;

/**
* A wrapper around a Doctrine\DBAL\Driver\Connection that adds features like
Expand Down Expand Up @@ -1103,6 +1104,9 @@ public function transactional(Closure $func)
} catch (Exception $e) {
$this->rollBack();
throw $e;
} catch (Throwable $e) {
$this->rollBack();
throw $e;
}
}

Expand Down

0 comments on commit e30c77d

Please sign in to comment.