Skip to content

Commit

Permalink
catch throwables on updating
Browse files Browse the repository at this point in the history
might prevent catch some fails in feed parsing
  • Loading branch information
splitbrain committed Sep 5, 2024
1 parent c9956ba commit ac530f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ protected function updateFeeds($skipSources = false)
'Found {count} new suggestions at {source}',
['count' => $count, 'source' => $source['sourceurl']]
);
} catch (Exception $e) {
} catch (\Throwable $e) {
$this->error(
'Error fetching suggestions from {source}: {msg}',
['source' => $source['sourceurl'], 'msg' => $e->getMessage()]
Expand All @@ -168,7 +168,7 @@ protected function updateFeeds($skipSources = false)
try {
$count = $this->feedManager->fetchFeedItems($feed);
$this->success('[{feedid}] {count} items found', ['feedid' => $feed['feedid'], 'count' => $count]);
} catch (Exception $e) {
} catch (\Throwable $e) {
$this->error('[{feedid}] {msg}', ['feedid' => $feed['feedid'], 'msg' => $e->getMessage()]);
$this->debug($e->getTraceAsString());
}
Expand Down

0 comments on commit ac530f6

Please sign in to comment.