Catch exception so tasks still load although reminder is broken
This commit is contained in:
parent
a51f704c63
commit
47d6c2d92d
1 changed files with 6 additions and 1 deletions
|
@ -56,7 +56,12 @@ Class TaskParser {
|
|||
$task['due'] = $this->helper->parseDateObject($vtodo->DUE);
|
||||
$task['completed_date'] = $this->helper->parseDateObject($vtodo->COMPLETED);
|
||||
$task['completed'] = (bool) $task['completed_date'];
|
||||
$task['reminder'] = $this->reminderService->parseReminder($vtodo->VALARM, $vtodo->DTSTART, $vtodo->DUE);
|
||||
try {
|
||||
$task['reminder'] = $this->reminderService->parseReminder($vtodo->VALARM, $vtodo->DTSTART, $vtodo->DUE);
|
||||
} catch(\Exception $e) {
|
||||
\OCP\Util::writeLog('tasks', 'TaskID '.$vtodo->ID.': '.$e->getMessage(), \OCP\Util::DEBUG);
|
||||
$task['reminder'] = false;
|
||||
}
|
||||
$task['priority'] = $this->parsePriority($vtodo->PRIORITY);
|
||||
$task['starred'] = $this->parseStarred($task['priority']);
|
||||
$task['complete'] = $this->parsePercentCompleted($vtodo->{'PERCENT-COMPLETE'});
|
||||
|
|
Loading…
Reference in a new issue