From 3699485edd9b1da5a0cfab023facc0363157c46c Mon Sep 17 00:00:00 2001
From: Susanne Moog <look@susi.dev>
Date: Fri, 20 Mar 2020 14:14:45 +0100
Subject: [PATCH] [BUGFIX] Do not stop indexing on errors

The FAL indexer stopped the whole indexing queue if any error occured.
While single files might not be indexed, the whole process should not
be stopped because of it. Exceptions while indexing are now caught and
logged, but the indexing process continued.

Resolves: #62253
Releases: master, 9.5
Change-Id: Id64cfb59d7e94edf52ca941254761a2014a3aa06
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63815
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
---
 typo3/sysext/core/Classes/Resource/Index/Indexer.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/typo3/sysext/core/Classes/Resource/Index/Indexer.php b/typo3/sysext/core/Classes/Resource/Index/Indexer.php
index 3794276bf8cb..ffacf2c14521 100644
--- a/typo3/sysext/core/Classes/Resource/Index/Indexer.php
+++ b/typo3/sysext/core/Classes/Resource/Index/Indexer.php
@@ -270,6 +270,8 @@ class Indexer implements LoggerAwareInterface
                 }
             } catch (InvalidHashException $e) {
                 $this->logger->error('Unable to create hash for file ' . $identifier);
+            } catch (\Exception $e) {
+                $this->logger->error('Unable to index / update file with identifier ' . $identifier . ' (Error: ' . $e->getMessage() . ')');
             }
         }
     }
-- 
GitLab