]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
catch exceptions in OStatus updates, log, and continue
authorEvan Prodromou <evan@status.net>
Thu, 18 Mar 2010 12:55:14 +0000 (07:55 -0500)
committerEvan Prodromou <evan@status.net>
Thu, 18 Mar 2010 12:55:14 +0000 (07:55 -0500)
plugins/OStatus/scripts/updateostatus.php

index d553a7d625cad22c118f3434c3b47b1a3d4c2dc5..1ef1ee829a35453a878014023ed1604eabde01ba 100644 (file)
@@ -56,7 +56,12 @@ try {
         $user = new User();
         if ($user->find()) {
             while ($user->fetch()) {
-                updateOStatus($user);
+                try {
+                    updateOStatus($user);
+                } catch (Exception $e) {
+                    common_log(LOG_NOTICE, "Couldn't convert OMB subscriptions ".
+                               "for {$user->nickname} to OStatus: " . $e->getMessage());
+                }
             }
         }
     } else {
@@ -118,8 +123,7 @@ function updateOStatus($user)
             if (!have_option('q', 'quiet')) {
                 echo "fail.\n";
             }
-            continue;
-            common_log(LOG_WARNING, "Couldn't convert OMB subscription (" . $up->nickname . ", " . $rp->nickname .
+            common_log(LOG_NOTICE, "Couldn't convert OMB subscription (" . $up->nickname . ", " . $rp->nickname .
                        ") to OStatus: " . $e->getMessage());
             continue;
         }