catch exceptions during import and continue
authorPaul Mehrer <p.mehrer@metaways.de>
Wed, 30 Jul 2014 13:33:01 +0000 (15:33 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Thu, 4 Sep 2014 09:26:37 +0000 (11:26 +0200)
Change-Id: Ib226ea37bd49fce97e13bfa4ec64abc5108b9a2d
Reviewed-on: http://gerrit.tine20.com/customers/913
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: Jenkins CI (http://ci.tine20.com/)
tine20/Calendar/Import/CalDav/Client.php

index 36e3171..4a001d5 100644 (file)
@@ -268,10 +268,10 @@ class Calendar_Import_CalDav_Client extends Tinebase_Import_CalDav_Client
                                 $value['{urn:ietf:params:xml:ns:caldav}calendar-data'],
                                 $onlyCurrentUserOrganizer
                             );
-                        } catch(Tinebase_Exception_UnexpectedValue $e) {
-                            if ('no vevents found' != $e->getMessage()) {
-                                throw $e;
-                            }
+                        } catch (Exception $e) {
+                            if (Tinebase_Core::isLogLevel(Zend_Log::WARN))
+                                Tinebase_Core::getLogger()->warn(__METHOD__ . '::' . __LINE__ . ' could not create event from data: ' . $value['{urn:ietf:params:xml:ns:caldav}calendar-data']);
+                            Tinebase_Exception::log($e);
                         }
                     }
                 }