From: Evan Prodromou Date: Tue, 13 Jul 2010 14:53:47 +0000 (-0400) Subject: log exceptions in atom feeds, but don't let them kill the output X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6968c96b44d17295ceb229af2385449400f4976a;p=quix0rs-gnu-social.git log exceptions in atom feeds, but don't let them kill the output --- diff --git a/lib/atomnoticefeed.php b/lib/atomnoticefeed.php index 6ed803ce4e..b882172918 100644 --- a/lib/atomnoticefeed.php +++ b/lib/atomnoticefeed.php @@ -125,12 +125,17 @@ class AtomNoticeFeed extends Atom10Feed */ function addEntryFromNotice($notice) { - $source = $this->showSource(); - $author = $this->showAuthor(); + try { + $source = $this->showSource(); + $author = $this->showAuthor(); - $cur = empty($this->cur) ? common_current_user() : $this->cur; + $cur = empty($this->cur) ? common_current_user() : $this->cur; - $this->addEntryRaw($notice->asAtomEntry(false, $source, $author, $cur)); + $this->addEntryRaw($notice->asAtomEntry(false, $source, $author, $cur)); + } catch (Exception $e) { + common_log(LOG_ERR, $e->getMessage()); + // we continue on exceptions + } } function showSource()