Commit cb824180 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

DbException supprimé depuis longtemps, à remplacer par $this->translate($e);...

DbException supprimé depuis longtemps, à remplacer par $this->translate($e); dansle controller, avec $e = \Exception
parent 2a902786
Loading
Loading
Loading
Loading
+1 −2
Changes for module/Application/src/Controller/DomaineFonctionnelController.php: 1 added line, 2 removed lines.
Original line number Diff line number Diff line
@@ -49,7 +49,6 @@ class DomaineFonctionnelController extends AbstractController
                $this->getServiceDomaineFonctionnel()->save($fr);
                $this->flashMessenger()->addSuccessMessage('Enregistrement effectué');
            } catch (\Exception $e) {
                $e = DbException::translate($e);
                $this->flashMessenger()->addErrorMessage($this->translate($e));
            }
        });
@@ -67,7 +66,7 @@ class DomaineFonctionnelController extends AbstractController
            $this->getServiceDomaineFonctionnel()->delete($domaineFonctionnel);
            $this->flashMessenger()->addSuccessMessage("Domaine Fonctionnel supprimé avec succès.");
        } catch (\Exception $e) {
            $this->flashMessenger()->addErrorMessage(DbException::translate($e)->getMessage());
            $this->flashMessenger()->addErrorMessage($this->translate($e));
        }

        return new MessengerViewModel(compact('domaineFonctionnel'));
+0 −1
Changes for module/Application/src/Controller/TagController.php: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -4,7 +4,6 @@ namespace Application\Controller;

use Application\Entity\Db\Tag;
use Application\Form\Tag\Traits\TagSaisieFormAwareTrait;
use Application\Exception\DbException;
use Application\Service\Traits\TagServiceAwareTrait;
use UnicaenApp\View\Model\MessengerViewModel;

+1 −1
Changes for module/Service/src/Controller/MotifModificationServiceController.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ class MotifModificationServiceController extends AbstractController
            $this->getServiceMotifModificationServiceDu()->delete($motifModificationServiceDu);
            $this->flashMessenger()->addSuccessMessage("Motif de Modification de Service supprimé avec succès.");
        } catch (\Exception $e) {
            $this->flashMessenger()->addErrorMessage(DbException::translate($e)->getMessage());
            $this->flashMessenger()->addErrorMessage($this->translate($e));
        }

        return new MessengerViewModel();