Skip to content

Commit

Permalink
Update CronListener.php
Browse files Browse the repository at this point in the history
Added Contao System::Log entries for better and easier debugging.
  • Loading branch information
w3scout authored Jul 12, 2023
1 parent 8476213 commit 3dd01ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/EventListener/CronListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -586,9 +586,11 @@ private function getFbPostList($fb, $accessToken, $account)
$account.'/posts?access_token='.$accessToken.'&fields=id,from,created_time,message,permalink_url'
);
} catch (FacebookResponseException $e) {
System::log('Graph returned an error: ' . $e->getMessage(), __METHOD__, TL_ERROR);
echo 'Graph returned an error: '.$e->getMessage();
exit;
} catch (FacebookSDKException $e) {
System::log('Facebook SDK returned an error: ' . $e->getMessage(), __METHOD__, TL_ERROR);
echo 'Facebook SDK returned an error: '.$e->getMessage();
exit;
}
Expand All @@ -601,9 +603,11 @@ private function getFbFeed($fb, $accessToken, $account)
$account.'/feed?access_token='.$accessToken.'&fields=id,from,created_time,message,permalink_url'
);
} catch (FacebookResponseException $e) {
System::log('Graph returned an error: ' . $e->getMessage(), __METHOD__, TL_ERROR);
echo 'Graph returned an error: '.$e->getMessage();
exit;
} catch (FacebookSDKException $e) {
System::log('Facebook SDK returned an error: ' . $e->getMessage(), __METHOD__, TL_ERROR);
echo 'Facebook SDK returned an error: '.$e->getMessage();
exit;
}
Expand Down

0 comments on commit 3dd01ed

Please sign in to comment.