summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-07-13 10:53:47 -0400
committerEvan Prodromou <evan@status.net>2010-07-13 10:53:47 -0400
commit6968c96b44d17295ceb229af2385449400f4976a (patch)
treea435300f7b55d306abf038a53eaf3970353399a4 /lib
parentdfd65a4290c7c2f6137d5508597189c4202bfaee (diff)
log exceptions in atom feeds, but don't let them kill the output
Diffstat (limited to 'lib')
-rw-r--r--lib/atomnoticefeed.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/atomnoticefeed.php b/lib/atomnoticefeed.php
index 6ed803ce4..b88217291 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()