[BUGFIX] Catch SQL Errors in SysRefindexHashUpdater 99/52399/3
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Sat, 8 Apr 2017 22:04:12 +0000 (15:04 -0700)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 2 May 2017 18:06:21 +0000 (20:06 +0200)
Show the actual SQL error message to the user when an error
occurs while executing the update statements in the
SysRefindexHashUpdater instead of rethrowing the exception.

Change-Id: Ic3ca404438c221db6eecc5c912dcd416d2be6cde
Resolves: #80734
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/52399
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christer V <cvi@systime.dk>
Reviewed-by: Marcus Schwemer <ms@schwemer.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Tested-by: Mona Muzaffar <mona.muzaffar@gmx.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/install/Classes/Updates/SysRefindexHashUpdater.php

index a1930e3..0e70b9d 100644 (file)
@@ -136,8 +136,9 @@ class SysRefindexHashUpdater extends AbstractUpdate
             $connection->commit();
             $this->markWizardAsDone();
         } catch (DBALException $e) {
+            $customMessage = 'SQL-ERROR: ' . htmlspecialchars($e->getPrevious()->getMessage());
             $connection->rollBack();
-            throw $e;
+            return false;
         }
 
         return true;