Tinebase_User::syncUsers - catch all exceptions and continue syncing
authorPaul Mehrer <p.mehrer@metaways.de>
Wed, 17 Feb 2016 13:13:46 +0000 (14:13 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 17 Feb 2016 17:25:47 +0000 (18:25 +0100)
not all exceptions were catched and the sync aboarted in case of an
uncatched exception.

now all exceptions are catched and only the sync of the user causing
the exception will be skiped, the sync will continue with the next user.

Change-Id: Ie885ce32178267141c76fd85b075e2ba93c26cf9
Reviewed-on: http://gerrit.tine20.com/customers/2737
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/User.php

index 4b2ce3f..0952de5 100644 (file)
@@ -742,9 +742,10 @@ class Tinebase_User
         foreach ($users as $user) {
             try {
                 self::syncUser($user, $options);
-            } catch (Tinebase_Exception_NotFound $ten) {
+            } catch (Exception $e) {
                 Tinebase_Core::getLogger()->crit(__METHOD__ . '::' . __LINE__ . " User {$user->accountLoginName} not synced: "
-                    . $ten->getMessage());
+                    . $e->getMessage() . PHP_EOL
+                    . $e->getTraceAsString());
             }
         }