Project

General

Profile

Actions

Bug #65248

closed

Storage indexing task should not catch exception

Added by Francois Suter almost 9 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2015-02-24
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

The FileStorageIndexingTask catches any exception that may happen during indexing and returns FALSE in case anything happens.

This is not the proper way for tasks. Instead they should let the error bubble up and the Scheduler handle the display of the related error.

Example use case: imagine that you have a badly screwed file name (users are creative) like foo\bar.txt. FAL will choke upon such a file name. Currently the Scheduler BE module will report the error as:

"Execution of task "File Abstraction Layer: Update storage index (scheduler)" failed with the following message: Task failed to execute successfully. Class: TYPO3\CMS\Scheduler\Task\FileStorageIndexingTask, UID: 8"

By letting the exception bubble up, we get this instead:

"Execution of task "File Abstraction Layer: Update storage index (scheduler)" failed with the following message: File /user_upload/foo\bar.txt does not exist."

which is far more useful in trying to solve the problem.

Actions #1

Updated by Gerrit Code Review almost 9 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37156

Actions #2

Updated by Gerrit Code Review almost 9 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37156

Actions #3

Updated by Gerrit Code Review almost 9 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37424

Actions #4

Updated by Francois Suter almost 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF