From 9167ba8d2d889ad3e8b51e02e93102b2b2dde7dc Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 30 May 2011 09:57:49 -0400 Subject: [PATCH] ActivityImporter catches thrown exceptions by plugins and marks entry done --- lib/activityimporter.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/activityimporter.php b/lib/activityimporter.php index b1f30fa4bf..b5c83516ec 100644 --- a/lib/activityimporter.php +++ b/lib/activityimporter.php @@ -63,9 +63,9 @@ class ActivityImporter extends QueueHandler $done = null; - if (Event::handle('StartImportActivity', - array($user, $author, $activity, $trusted, &$done))) { - try { + try { + if (Event::handle('StartImportActivity', + array($user, $author, $activity, $trusted, &$done))) { switch ($activity->verb) { case ActivityVerb::FOLLOW: $this->subscribeProfile($user, $author, $activity); @@ -83,10 +83,10 @@ class ActivityImporter extends QueueHandler Event::handle('EndImportActivity', array($user, $author, $activity, $trusted)); $done = true; - } catch (Exception $e) { - common_log(LOG_ERR, $e->getMessage()); - $done = true; } + } catch (Exception $e) { + common_log(LOG_ERR, $e->getMessage()); + $done = true; } return $done; } -- 2.39.2