use of com.sun.syndication.fetcher.FetcherException in project OpenClinica by OpenClinica.
the class RssReaderServlet method getFeed.
void getFeed(PrintWriter pw) {
SyndFeed feed = null;
String htmlFeed = null;
try {
feed = feedFetcher.retrieveFeed(new URL(rssUrl));
htmlFeed = feedHtml(feed);
} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
htmlFeed = errorFeedHtml(e.getMessage());
e.printStackTrace();
} catch (FeedException e) {
// TODO Auto-generated catch block
htmlFeed = errorFeedHtml(e.getMessage());
e.printStackTrace();
} catch (FetcherException e) {
htmlFeed = errorFeedHtml(e.getMessage());
// TODO Auto-generated catch block
e.printStackTrace();
} catch (Exception e) {
htmlFeed = errorFeedHtml(e.getMessage());
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
pw.println(htmlFeed);
pw.close();
}
}
Aggregations