Log LocalFeedRepository.addFeeds() exceptions

This commit is contained in:
Shinokuni 2020-10-05 22:11:48 +02:00
parent cc17c8884b
commit eb58311040
1 changed files with 4 additions and 0 deletions

View File

@ -112,12 +112,16 @@ public class LocalFeedRepository extends ARepository<Void> {
insertionResult.setFeed(feed);
}
} catch (ParseException e) {
Log.d(TAG, "addFeeds: " + e.getMessage());
insertionResult.setInsertionError(FeedInsertionResult.FeedInsertionError.PARSE_ERROR);
} catch (UnknownFormatException e) {
Log.d(TAG, "addFeeds: " + e.getMessage());
insertionResult.setInsertionError(FeedInsertionResult.FeedInsertionError.FORMAT_ERROR);
} catch (NetworkErrorException | IOException e) {
Log.d(TAG, "addFeeds: " + e.getMessage());
insertionResult.setInsertionError(FeedInsertionResult.FeedInsertionError.NETWORK_ERROR);
} catch (Exception e) {
Log.d(TAG, "addFeeds: " + e.getMessage());
insertionResult.setInsertionError(FeedInsertionResult.FeedInsertionError.UNKNOWN_ERROR);
} finally {
insertionResult.setParsingResult(parsingResult);