From f17512cfe603b8f00576cdff10f3a3d71924c000 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 10 Sep 2010 11:50:19 -0700 Subject: [PATCH] Catch exceptions during SubMirror mirror attempt; log & skip that one if found. Should avoid things like RequireValidatedEmailPlugin causing infinite retry loops if the mirror-er isn't validated yet. --- plugins/SubMirror/lib/mirrorqueuehandler.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/SubMirror/lib/mirrorqueuehandler.php b/plugins/SubMirror/lib/mirrorqueuehandler.php index 92b36b5ebf..c1a6f65e38 100644 --- a/plugins/SubMirror/lib/mirrorqueuehandler.php +++ b/plugins/SubMirror/lib/mirrorqueuehandler.php @@ -37,7 +37,13 @@ class MirrorQueueHandler extends QueueHandler $mirror->subscribed = $notice->profile_id; if ($mirror->find()) { while ($mirror->fetch()) { - $mirror->mirrorNotice($notice); + try { + $mirror->mirrorNotice($notice); + } catch (Exception $e) { + common_log(LOG_ERR, "Exception trying to mirror notice $notice->id " . + "for subscriber $mirror->subscriber ($mirror->style): " . + $e->getMessage()); + } } } return true; -- 2.39.5