We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 6968c96b authored by Evan Prodromou's avatar Evan Prodromou

log exceptions in atom feeds, but don't let them kill the output

parent dfd65a42
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment