1
0
mirror of synced 2025-02-02 21:41:45 +03:00

#5796 replacing Exception catching with Throwable catching, removing PHP5 compliance code

This commit is contained in:
Marco Pivetta 2017-09-02 13:44:12 +02:00
parent 874a5e3547
commit a1c93bfd48
No known key found for this signature in database
GPG Key ID: 4167D3337FD9D629
6 changed files with 1 additions and 29 deletions

View File

@ -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;
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -75,10 +75,6 @@ EOT
} catch (\Throwable $e) {
$output->writeln('<error>' . $e->getMessage() . '</error>');
return 1;
} catch (\Exception $e) { // PHP 5
$output->writeln('<error>' . $e->getMessage() . '</error>');
return 1;
}

View File

@ -745,9 +745,7 @@ class SchemaTool
try {
$conn->executeQuery($sql);
} catch (\Throwable $e) {
} catch (\Exception $e) { // PHP 5
// ignored
}
}
}

View File

@ -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;
}