From: Brion Vibber Date: Fri, 10 Sep 2010 18:50:19 +0000 (-0700) Subject: Catch exceptions during SubMirror mirror attempt; log & skip that one if found. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f17512cfe603b8f00576cdff10f3a3d71924c000;p=quix0rs-gnu-social.git 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. --- 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;