Exceptions
Exceptions 3
Doctrine\DBAL\Exception\ UniqueConstraintViolationException
in
vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php->execute (line 286)
$loEvenement->setTEvenement(new DateTime()) ;
$loEvenement->setITypeEvenement($loRepo::TYPE_ROUTENOTFOUND) ;
$loEvenement->setCDescEvenement($request->getRequestUri()) ;
$this->entityManager->persist($loEvenement) ;
$this->entityManager->flush() ;
// LG 20241023 début
// $lbBanni = $loRepo->updateABannir($loAdresseIP) ;
$lbVientDetreBannie = false ;
$lbBanni = $loRepo->updateABannir($loAdresseIP, $lbVientDetreBannie) ;
*
* @throws \Exception
*/
private function handleException(\Exception $e, Request $request, int $type): Response {
$event = new GetResponseForExceptionEvent($this, $request, $type, $e);
$this->dispatcher->dispatch(KernelEvents::EXCEPTION, $event);
// a listener might have replaced the exception
$e = $event->getException();
if (!$event->hasResponse()) {
Request::setTrustedHosts([$trustedHosts]);
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
// // LG 20220802 pour tests
// if (file_exists("/home/luc/partage_win10/Poubelle/")) {
// $jsonfile = "/home/luc/partage_win10/Poubelle/comparePasswords.txt";
// } else if (file_exists("/var/www/html/PAA/Recette/var/log/")) {
Doctrine\DBAL\Driver\ PDOException
in
vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php->execute (line 286)
$loEvenement->setTEvenement(new DateTime()) ;
$loEvenement->setITypeEvenement($loRepo::TYPE_ROUTENOTFOUND) ;
$loEvenement->setCDescEvenement($request->getRequestUri()) ;
$this->entityManager->persist($loEvenement) ;
$this->entityManager->flush() ;
// LG 20241023 début
// $lbBanni = $loRepo->updateABannir($loAdresseIP) ;
$lbVientDetreBannie = false ;
$lbBanni = $loRepo->updateABannir($loAdresseIP, $lbVientDetreBannie) ;
*
* @throws \Exception
*/
private function handleException(\Exception $e, Request $request, int $type): Response {
$event = new GetResponseForExceptionEvent($this, $request, $type, $e);
$this->dispatcher->dispatch(KernelEvents::EXCEPTION, $event);
// a listener might have replaced the exception
$e = $event->getException();
if (!$event->hasResponse()) {
Request::setTrustedHosts([$trustedHosts]);
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
// // LG 20220802 pour tests
// if (file_exists("/home/luc/partage_win10/Poubelle/")) {
// $jsonfile = "/home/luc/partage_win10/Poubelle/comparePasswords.txt";
// } else if (file_exists("/var/www/html/PAA/Recette/var/log/")) {
PDOException
in
vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php->execute (line 286)
$loEvenement->setTEvenement(new DateTime()) ;
$loEvenement->setITypeEvenement($loRepo::TYPE_ROUTENOTFOUND) ;
$loEvenement->setCDescEvenement($request->getRequestUri()) ;
$this->entityManager->persist($loEvenement) ;
$this->entityManager->flush() ;
// LG 20241023 début
// $lbBanni = $loRepo->updateABannir($loAdresseIP) ;
$lbVientDetreBannie = false ;
$lbBanni = $loRepo->updateABannir($loAdresseIP, $lbVientDetreBannie) ;
*
* @throws \Exception
*/
private function handleException(\Exception $e, Request $request, int $type): Response {
$event = new GetResponseForExceptionEvent($this, $request, $type, $e);
$this->dispatcher->dispatch(KernelEvents::EXCEPTION, $event);
// a listener might have replaced the exception
$e = $event->getException();
if (!$event->hasResponse()) {
Request::setTrustedHosts([$trustedHosts]);
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
// // LG 20220802 pour tests
// if (file_exists("/home/luc/partage_win10/Poubelle/")) {
// $jsonfile = "/home/luc/partage_win10/Poubelle/comparePasswords.txt";
// } else if (file_exists("/var/www/html/PAA/Recette/var/log/")) {
Stack Traces 3
[3/3] UniqueConstraintViolationException |
---|
Doctrine\DBAL\Exception\UniqueConstraintViolationException: An exception occurred while executing 'INSERT INTO Paa_Securite.adressesIP (iid_adresseIP, ip, tbanissement, bAuMoinsUneAuthentificationReussie) VALUES (?, ?, ?, ?)' with params [2633, "165.154.118.169", null, null]: SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "un_adressesip_ip" DETAIL: Key (ip)=(165.154.118.169) already exists. at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php:51 at Doctrine\DBAL\Driver\AbstractPostgreSQLDriver->convertException() (vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:169) at Doctrine\DBAL\DBALException::wrapException() (vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:145) at Doctrine\DBAL\DBALException::driverExceptionDuringQuery() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php:162) at Doctrine\DBAL\Statement->execute() (vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:286) at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->executeInserts() (vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1088) at Doctrine\ORM\UnitOfWork->executeInserts() (vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:401) at Doctrine\ORM\UnitOfWork->commit() (vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:370) at Doctrine\ORM\EntityManager->flush() (src/Event/ForceBruteListener.php:96) at App\Event\ForceBruteListener->onKernelException() (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:108) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke() (vendor/symfony/event-dispatcher/EventDispatcher.php:203) at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch() (vendor/symfony/event-dispatcher/EventDispatcher.php:43) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:135) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch() (vendor/symfony/http-kernel/HttpKernel.php:213) at Symfony\Component\HttpKernel\HttpKernel->handleException() (vendor/symfony/http-kernel/HttpKernel.php:76) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:190) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:28) |
[2/3] PDOException |
---|
Doctrine\DBAL\Driver\PDOException: SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "un_adressesip_ip" DETAIL: Key (ip)=(165.154.118.169) already exists. at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:119 at Doctrine\DBAL\Driver\PDOStatement->execute() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php:153) at Doctrine\DBAL\Statement->execute() (vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:286) at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->executeInserts() (vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1088) at Doctrine\ORM\UnitOfWork->executeInserts() (vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:401) at Doctrine\ORM\UnitOfWork->commit() (vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:370) at Doctrine\ORM\EntityManager->flush() (src/Event/ForceBruteListener.php:96) at App\Event\ForceBruteListener->onKernelException() (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:108) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke() (vendor/symfony/event-dispatcher/EventDispatcher.php:203) at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch() (vendor/symfony/event-dispatcher/EventDispatcher.php:43) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:135) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch() (vendor/symfony/http-kernel/HttpKernel.php:213) at Symfony\Component\HttpKernel\HttpKernel->handleException() (vendor/symfony/http-kernel/HttpKernel.php:76) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:190) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:28) |
[1/3] PDOException |
---|
PDOException: SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "un_adressesip_ip" DETAIL: Key (ip)=(165.154.118.169) already exists. at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117 at PDOStatement->execute() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117) at Doctrine\DBAL\Driver\PDOStatement->execute() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php:153) at Doctrine\DBAL\Statement->execute() (vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:286) at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->executeInserts() (vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1088) at Doctrine\ORM\UnitOfWork->executeInserts() (vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:401) at Doctrine\ORM\UnitOfWork->commit() (vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:370) at Doctrine\ORM\EntityManager->flush() (src/Event/ForceBruteListener.php:96) at App\Event\ForceBruteListener->onKernelException() (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:108) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke() (vendor/symfony/event-dispatcher/EventDispatcher.php:203) at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch() (vendor/symfony/event-dispatcher/EventDispatcher.php:43) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:135) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch() (vendor/symfony/http-kernel/HttpKernel.php:213) at Symfony\Component\HttpKernel\HttpKernel->handleException() (vendor/symfony/http-kernel/HttpKernel.php:76) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:190) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:28) |