[BUGFIX] Let Scheduler handle storage indexing exception 24/37424/2
authorFrancois Suter <francois@typo3.org>
Tue, 24 Feb 2015 09:05:43 +0000 (10:05 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 1 Mar 2015 17:54:28 +0000 (18:54 +0100)
The FileStorageIndexingTask should not handle exceptions itself.
Instead it should let them bubble up to let the Scheduler take
care of the reporting.

Resolves: #65248
Releases: 6.2, master
Change-Id: Ib29c20b40de8abd27869682c9f6d4479718d25f5
Reviewed-on: http://review.typo3.org/37424
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/scheduler/Classes/Task/FileStorageIndexingTask.php

index 7e94aa4..fd80dcb 100644 (file)
@@ -32,20 +32,14 @@ class FileStorageIndexingTask extends \TYPO3\CMS\Scheduler\Task\AbstractTask {
         * @return boolean TRUE on successful execution, FALSE on error
         */
        public function execute() {
-               $success = FALSE;
                if ((int)$this->storageUid > 0) {
                        $storage = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->getStorageObject($this->storageUid);
                        $storage->setEvaluatePermissions(FALSE);
                        $indexer = $this->getIndexer($storage);
-                       try {
-                               $indexer->processChangesInStorages();
-                               $success = TRUE;
-                       } catch (\Exception $e) {
-                               $success = FALSE;
-                       }
+                       $indexer->processChangesInStorages();
                        $storage->setEvaluatePermissions(TRUE);
                }
-               return $success;
+               return TRUE;
        }
 
        /**
@@ -58,5 +52,4 @@ class FileStorageIndexingTask extends \TYPO3\CMS\Scheduler\Task\AbstractTask {
                return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\Index\\Indexer', $storage);
        }
 
-
 }