+ foreach ($notices as $noticeAct) {
+ try {
+ $nact = $noticeAct->asActivity($this->user->getProfile());
+ if ($format == Feed::ATOM) {
+ $nact->outputTo($this, false, false);
+ } else {
+ if ($haveOne) {
+ fwrite($handle, ",");
+ }
+ fwrite($handle, json_encode($nact->asArray()));
+ $haveOne = true;
+ }
+ } catch (Exception $e) {
+ common_log(LOG_ERR, $e->getMessage());
+ continue;
+ }
+ }
+ } catch (Exception $e) {
+ common_log(LOG_ERR, $e->getMessage());