Commit 2224e78b authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Commentaires dans ImportService

parent f1e45367
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -131,6 +131,8 @@ class ImportService

        $startDate = date_create();

        // But de ce try-catch : si une erreur est rencontrée, elle est interceptée pour ne rien interrompre,
        // et mise dans le résultat de l'import.
        try {
            $this->logFacadeService->createImportLog();
            $this->importFacadeService->validateDestination();
@@ -138,6 +140,7 @@ class ImportService
            $this->importFacadeService->fetchSource();
            $this->importFacadeService->discoverSourceColumns();

            // NB : si une erreur d'écriture en bdd est rencontrée, un rollback sera fait.
            $result = $this->importFacadeService->importToDestination();
        } catch (Exception $e) {
            $result = new ImportResult();