Project

General

Profile

Actions

Bug #87375

closed

Proper exception messages for Scheduler::fetchTask()

Added by Stefanos Karasavvidis almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
scheduler
Target version:
-
Start date:
2019-01-09
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The method Scheduler::fetchTask() takes an optional uid as argument. If the uid is given, the task with this uid should be returned.

If no uid is given, the next scheduled overdue task should be returned (the method description says "the next due task", but what is implemented is the next task that is overdue).

A) If a uid is given but this uid does not exist, an exception with the misleading message 'Query could not be executed. Possible defect in tables tx_scheduler_task or tx_scheduler_task_group or DB server problems' is thrown.

B) If no uid is given, and no task is overdue, an exception is thrown. The current code tries to use as message "No task". But this part is never reached.

A) should be fixed to a proper message, like "no such task"

B) is never reached because the check for A precedes it and evaluates to true even for case B.

Actions

Also available in: Atom PDF