Skip to content

Commit

Permalink
Clean up exception handling in Connection
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Sep 3, 2020
1 parent 6c2d629 commit a2ec3ab
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/Doctrine/DBAL/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use Doctrine\DBAL\Query\QueryBuilder;
use Doctrine\DBAL\Schema\AbstractSchemaManager;
use Doctrine\DBAL\Types\Type;
use Exception;
use Throwable;
use Traversable;

Expand Down Expand Up @@ -406,7 +405,7 @@ private function detectDatabasePlatform(): void
*
* @return string|null
*
* @throws Exception
* @throws Throwable
*/
private function getDatabasePlatformVersion()
{
Expand Down Expand Up @@ -1470,7 +1469,6 @@ public function lastInsertId($name = null)
*
* @return mixed The value returned by $func
*
* @throws Exception
* @throws Throwable
*/
public function transactional(Closure $func)
Expand All @@ -1481,10 +1479,6 @@ public function transactional(Closure $func)
$this->commit();

return $res;
} catch (Exception $e) {
$this->rollBack();

throw $e;
} catch (Throwable $e) {
$this->rollBack();

Expand Down

0 comments on commit a2ec3ab

Please sign in to comment.