diff --git a/lib/Doctrine/ORM/EntityManager.php b/lib/Doctrine/ORM/EntityManager.php index 99a9b15dc..49d7a372b 100644 --- a/lib/Doctrine/ORM/EntityManager.php +++ b/lib/Doctrine/ORM/EntityManager.php @@ -240,11 +240,6 @@ use Doctrine\Common\Util\ClassUtils; $this->close(); $this->conn->rollBack(); - throw $e; - } catch (\Exception $e) { // PHP 5 - $this->close(); - $this->conn->rollBack(); - throw $e; } } diff --git a/lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php b/lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php index 1ecd7a7b2..e7287b708 100644 --- a/lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php +++ b/lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php @@ -134,10 +134,6 @@ class MultiTableDeleteExecutor extends AbstractSqlExecutor $conn->executeUpdate($this->_dropTempTableSql); // Re-throw exception - throw $exception; - } catch (\Exception $exception) { // PHP 5 - $conn->executeUpdate($this->_dropTempTableSql); - throw $exception; } diff --git a/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php b/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php index 296b7d553..5dd9b1514 100644 --- a/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php +++ b/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php @@ -193,10 +193,6 @@ class MultiTableUpdateExecutor extends AbstractSqlExecutor $conn->executeUpdate($this->_dropTempTableSql); // Re-throw exception - throw $exception; - } catch (\Exception $exception) { // PHP 5 - $conn->executeUpdate($this->_dropTempTableSql); - throw $exception; } diff --git a/lib/Doctrine/ORM/Tools/Console/Command/EnsureProductionSettingsCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/EnsureProductionSettingsCommand.php index e628b7049..5876d2d1f 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/EnsureProductionSettingsCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/EnsureProductionSettingsCommand.php @@ -75,10 +75,6 @@ EOT } catch (\Throwable $e) { $output->writeln('' . $e->getMessage() . ''); - return 1; - } catch (\Exception $e) { // PHP 5 - $output->writeln('' . $e->getMessage() . ''); - return 1; } diff --git a/lib/Doctrine/ORM/Tools/SchemaTool.php b/lib/Doctrine/ORM/Tools/SchemaTool.php index e84a9c53d..a0d3af2b4 100644 --- a/lib/Doctrine/ORM/Tools/SchemaTool.php +++ b/lib/Doctrine/ORM/Tools/SchemaTool.php @@ -745,9 +745,7 @@ class SchemaTool try { $conn->executeQuery($sql); } catch (\Throwable $e) { - - } catch (\Exception $e) { // PHP 5 - + // ignored } } } diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php index c5598cd4b..09bc313c1 100644 --- a/lib/Doctrine/ORM/UnitOfWork.php +++ b/lib/Doctrine/ORM/UnitOfWork.php @@ -43,8 +43,6 @@ use Doctrine\ORM\Persisters\Entity\JoinedSubclassPersister; use Doctrine\ORM\Persisters\Entity\SingleTablePersister; use Doctrine\ORM\Proxy\Proxy; use Doctrine\ORM\Utility\IdentifierFlattener; -use Exception; -use Throwable; use InvalidArgumentException; use UnexpectedValueException; @@ -418,13 +416,6 @@ class UnitOfWork implements PropertyChangedListener $this->afterTransactionRolledBack(); - throw $e; - } catch (\Exception $e) { // PHP 5 - $this->em->close(); - $conn->rollBack(); - - $this->afterTransactionRolledBack(); - throw $e; }