Project

General

Profile

Actions

Bug #65248

closed

Storage indexing task should not catch exception

Added by Francois Suter about 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

Also available in: Atom PDF