/**
* @throws InvalidCalendarException
*/
- private function importCalendarObject(int $calendarId, VCalendar $vCalendarObject, OutputInterface $output): void {
+ private function importCalendarObject(int $calendarId, VCalendar $vCalendarObject, string $filename, OutputInterface $output): void {
try {
$this->calDavBackend->createCalendarObject(
$calendarId,
CalDavBackend::CALENDAR_TYPE_CALENDAR,
);
} catch (Throwable $e) {
- // Rollback creation of calendar on error
- $output->writeln('Error creating calendar object, rolling back creation of calendar…');
+ $output->writeln("Error creating calendar object, rolling back creation of \"$filename\" calendar…");
$this->calDavBackend->deleteCalendar($calendarId, true);
throw new InvalidCalendarException();
}
$vCalendarObject->add($component);
}
}
- $this->importCalendarObject($calendarId, $vCalendarObject, $output);
+ $this->importCalendarObject($calendarId, $vCalendarObject, $filename, $output);
}
foreach ($ungroupedCalendarComponents as $component) {
foreach ($this->getRequiredImportComponents($vCalendar, $component) as $component) {
$vCalendarObject->add($component);
}
- $this->importCalendarObject($calendarId, $vCalendarObject, $output);
+ $this->importCalendarObject($calendarId, $vCalendarObject, $filename, $output);
}
}