Revert error cleanup to allow phpstan.
This commit is contained in:
parent
e61c37481f
commit
f2b4dc346a
|
@ -6,7 +6,6 @@ namespace App\Doctrine;
|
|||
|
||||
use App\Entity\Interfaces\IdentifiableEntityInterface;
|
||||
use Closure;
|
||||
use Doctrine\DBAL\Exception\ConnectionException;
|
||||
use Doctrine\ORM\Decorator\EntityManagerDecorator;
|
||||
use Doctrine\ORM\ORMInvalidArgumentException;
|
||||
|
||||
|
@ -18,22 +17,6 @@ final class DecoratedEntityManager extends EntityManagerDecorator implements Rel
|
|||
{
|
||||
parent::__construct($createEm());
|
||||
|
||||
try {
|
||||
$this->getConnection()->getNativeConnection();
|
||||
} catch (ConnectionException $e) {
|
||||
if (2002 === $e->getCode()) {
|
||||
throw new \Exception(
|
||||
sprintf(
|
||||
'Could not connect to the database. Check the error log for additional information. (%s)',
|
||||
$e->getMessage()
|
||||
),
|
||||
$e->getCode()
|
||||
);
|
||||
}
|
||||
|
||||
throw $e;
|
||||
}
|
||||
|
||||
$this->createEm = $createEm(...);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue