List of usage examples for org.apache.commons.feedparser.network NetworkException getMessage
public String getMessage()
From source file:org.scify.NewSumServer.Server.Sources.RssParser.java
@Override public List<Article> getAllNewsByCategory(List<String> LinksToLoad, String sCategory) { LOGGER.log(Level.INFO, "Processing category {0}", sCategory); // Create and Initialize the Article List List<Article> lsResults = new ArrayList<Article>(); // Ommit bad URLs from the input list LinksToLoad = getValidLinks(LinksToLoad); // Iterate the list and getArticles for each Link for (String each : LinksToLoad) { List<Article> tmpList; try {/*w ww . ja va2 s. co m*/ tmpList = getNewsFromFeed(each, sCategory); if (tmpList != null || !tmpList.isEmpty()) { // Add the Articles to the list lsResults.addAll(tmpList); } } catch (NetworkException ex) { LOGGER.log(Level.SEVERE, ex.getMessage(), ex); } catch (IOException ex) { LOGGER.log(Level.SEVERE, ex.getMessage(), ex); } catch (FeedParserException ex) { LOGGER.log(Level.SEVERE, ex.getMessage(), ex); } } // System.err.println("Category " + sCategory + " : "+ lsResults.size()); this.lsFullItems.addAll(lsResults);//add all to save to file return lsResults; }